java jdk1.8新特性Stream API( 六 )


System.out.println(collect.getMax());
System.out.println(collect.getMin());
System.out.println(collect.getSum());


}

@Test
public void test8() {
String str1 = employees.stream().map(Employee::getName).collect(Collectors.joining());


System.out.println(str1);


System.out.println("---------------------------------");


String str2 = employees.stream().map(Employee::getName).collect(Collectors.joining(","));


System.out.println(str2);


System.out.println("---------------------------------");


String str3 = employees.stream().map(Employee::getName).collect(Collectors.joining(",", "===", "==="));


System.out.println(str3);


}
}

java jdk1.8新特性Stream API

文章插图

java jdk1.8新特性Stream API

文章插图

java jdk1.8新特性Stream API

文章插图

java jdk1.8新特性Stream API

文章插图

77、Stream约操练

以上内容就是java jdk1.8新特性Stream API的内容啦 , 希望对你有所帮助哦!

推荐阅读