I don't know why I should use aggregate functions. I mean, it is supposed that an aggregate function would parallelize the execution if improves the performance.
https://docs.oracle.com/javase/tutorial/collections/streams/parallelism.html
But it is not true, according to the documentation, the code won't be parallel if you do not use a parallelStream() instead stream(), so Why should I use a stream() if nothing goes better?
Shouldn't those codes be the same?
//it is not parallel
listOfIntegers.stream()
.forEach( e -> System.out.print(e+" "));
And
//it is parallel
listOfIntegers.parallelStream()
.forEach( e -> System.out.print(e+" "));