3 ms·
Java has this since 8: Arrays.asList("hello", "world").parallelStream() .forEach(s -> System.out.println(s)); If you want to calculate stuff, you
by cfstras 6y ago
Java has this since 8:
Arrays.asList("hello", "world").parallelStream()
.forEach(s -> System.out.println(s));
If you want to calculate stuff, you can
List<String> suffixed = Arrays.asList("hello", "world").parallelStream()
.map(s -> s + "_suffix")
.collect(Collectors.toList())