Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class StreamSum {
- static final int SUM = IntStream.range(0, 100).parallel().reduce((n, m) -> n + m).getAsInt();
- public static void main(String[] args) {
- System.out.println(SUM);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment