Section 23.13 Java SE 8: Sequential vs. Parallel Streams

• Streams are easy to parallelize, enabling programs to benefit from enhanced performance on multi-core systems.

• To obtain a parallel stream, simply invoke method parallel on an existing stream.

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.