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事干啥的话
转变思维有点难啊
雷雷