February 2014
Beginner
1248 pages
62h 25m
English
• Class IntStream provides terminal operations for common stream reductions—count (p. 739) returns the number of elements, min returns the smallest int, max returns the largest int, sum returns the sum of all the ints and average returns an OptionalDouble (package java.util) containing the average of the ints as a value of type double.
• Class OptionalDouble’s getAsDouble method returns the double in the object or throws a NoSuchElementException. To prevent this exception, you can call method orElse, which returns the OptionalDouble’s value if there is one, or the value you pass to orElse, otherwise.
• IntStream method summaryStatistics performs the count, min, max, sum and ...
Read now
Unlock full access