主要记住:
一、遍历方法
1.forEach()
2.filter(T -> boolean)
3.findAny()和findFirst()
4.map(T -> R) 和flatMap(T -> stream)
5.distinct() 去重
6.limit(long n)和skip(long n)
二、判断方法
1.anyMatch(T -> boolean)
2.allMatch(T -> boolean)
3.noneMatch(T -> boolean)
参考:Java8使用Stream流实现List列表的遍历、统计、排序等_我高考零分!的博客-CSDN博客_stream流遍历list



