2016-04-11   java 

Java Stream API examples (forEach, map)

forEach

$ javac -Xdiags:verbose Main.java
$ java Main
a
b
c
d
e

map

$ javac -Xdiags:verbose Main.java
$ java Main
aaaaa
bbbbb
ccccc
ddddd
eeeee

参照

 2016-04-11   java