Java 8 Stream
public class TestStream {
public static void main(String[] args) {
//定义流 这里都是顺序流 并行流是parallelStream
Stream<Integer> integerStream = Stream.of(1,2,3,4);
//filter 对管道流中的数据进行过滤操作
//.collect(Collectors.toList()) 终端操作.
原创
2021-07-20 20:16:04 ·
101 阅读 ·
0 评论