Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Streams

The previous example can be simplified using parallel streams to be much more succinct:

import java.util.stream.IntStream;
public class Main {
public static void main(String args[]) throws Exception {
System.out.println("Parallel Sum: " +
IntStream.range(0, 10000).parallel().sum());
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content