![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
lambda
谢苏、
这个作者很懒,什么都没留下…
展开
-
list、数组、使用lambda+comparator实现排序
list、数组使用Comparator(比较器,一般jdk内部的类有比较的都实现了此接口,比如Long、Integer、List等)排序使用例子如下:package lambda;import com.google.common.collect.Lists;import java.util.*;/** * @author yin * @date 2019/05/2...原创 2019-05-28 12:50:01 · 931 阅读 · 0 评论 -
小白入门之 数组转列表的4种方法
现有一个Integer类型的数组,如:Integer[] arr = {1, 2, 3, 5, 6, 2};1.使用Stream流转listList<Integer> integerList = Stream.of(arr).collect(Collectors.toList());2.使用google 的 guava 包的封装方法List<Intege...原创 2019-07-16 13:53:01 · 1536 阅读 · 0 评论