Java8新特性

1:将Enum中的值转换为集合 List<String> enumNames = Stream.of(Enum.values() . .map(Enum::name) .collect(Collectors.toList()); 2:集合获取交集,并集,差集,去重并集,List集合中的重复次数 交集
posted @ 2021-10-09 15:58  Mrs.Third  阅读(72)  评论(0编辑  收藏  举报