Java SE 8

In Chapter 17, Java SE 8 Lambdas and Streams, the example of Fig. 17.5 uses stream methods min, max, count and average to process the elements of an int array elegantly and concisely without having to write repetition statements. In Chapter 23, Concurrency, the example of Fig. 23.29 uses stream method summaryStatistics to perform all of these operations in one method call.

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.