Java Professional — Hard
Key points
- Stateful operations like `sorted()` require collecting all elements before proceeding in a parallel stream
- This can reduce or eliminate the benefits of parallel execution
- It may result in slower performance compared to sequential execution
Ready to go further?
Related questions
