February 2014
Beginner
1248 pages
62h 25m
English
• Stream method sorted (p. 745) sorts a stream’s elements into ascending order by default.
• To create a collection containing a stream pipeline’s results, you can use Stream method collect (a terminal operation). As the stream pipeline is processed, method collect performs a mutable reduction operation that places the results into an object, such as a List, Map or Set.
• Method collect with one argument receives an object that implements interface Collector (package java.util.stream), which specifies how to perform the mutable reduction.
• Class Collectors (package java.util.stream) provides static methods that return predefined Collector implementations.
• Collectors method toList ...
Read now
Unlock full access