Parallel Streams

For Exercises 23.1523.17, you may need to create larger data sets to see a significant performance difference.

23.15 (Summarizing the Words in a File) Reimplement Fig. 17.17 using parallel streams. Use the Date/Time API timing techniques you learned in Section 23.12 to compare the time required for the sequential and parallel versions of the program.

23.16 (Summarizing the Characters in a File) Reimplement Exercise 17.9 using parallel streams. Use the Date/Time API timing techniques you learned in Section 23.12 to compare the time required for the sequential and parallel versions of the program.

23.17 (Summarizing the File Types in a Directory) Reimplement Exercise 17.10 using parallel streams. Use the Date/Time API timing ...

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.