设为首页 加入收藏

TOP

不好意思,list.contain 去重该换换了!(二)
2023-09-09 10:25:50 】 浏览:47
Tags:list.contain
ist.stream().distinct().collect(Collectors.toList()); System.out.println("stream 去重完毕,条数:" + testListDistinctResult.size()); } public static void main(String[] args) { List<String> testList = getTestList(); StopWatch stopWatch = new StopWatch(); stopWatch.start(); useStreamDistinct(testList); stopWatch.stop(); System.out.println("去重 最终耗时" + stopWatch.getTotalTimeMillis()); }

耗时:

评价:还不错,主要是代码也蛮简洁,有一点点动心。

来源:blog.csdn.net/qq_35387940/article/details/129885310

近期热文推荐:

1.1,000+ 道 Java面试题及答案整理(2022最新版)

2.劲爆!Java 协程要来了。。。

3.Spring Boot 2.x 教程,太全了!

4.别再写满屏的爆爆爆炸类了,试试装饰器模式,这才是优雅的方式!!

5.《Java开发手册(嵩山版)》最新发布,速速下载!

觉得不错,别忘了随手点赞+转发哦!

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Spring Boot 宣布移除 run 命令,.. 下一篇15000字、6个代码案例、5个原理图..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目