Java8学习笔记-07:常见的流操作之collect

List collected = Stream.of("a", "b", "c") .collect(Collectors.toList()); 
assertEquals(Arrays.asList("a", "b", "c"), collected); 

你可能感兴趣的:(Java8学习笔记-07:常见的流操作之collect)