Stream.of("1","2","3","4")这个是输入我想得到1,2,3,4的输出,怎么写?
欢迎选择我的课程,让我们一起见证您的进步~~
用reduce
Stream.of("1","2","3","4").reduce((a,b) -> a +"," +b))
如果你跟我一樣不懂reduce事幹啥的話
String.join(",", stringStream.collect(Collectors.toList()));
轉變思維有點難啊
雷雷
用reduce
如果你跟我一樣不懂reduce事幹啥的話
轉變思維有點難啊
雷雷