February 2014
Beginner
1248 pages
62h 25m
English
• Collectors static method groupingBy (p. 755) with one argument receives a Function that classifies objects in the stream—the values returned by this function are used as the keys in a Map. The corresponding values, by default, are Lists containing the stream elements in a given category.
• Map method forEach performs an operation on each key–value pair. The method receives an object that implements functional interface BiConsumer. This interface’s accept method has two parameters. For Maps, the first represents the key and the second the corresponding value.
Read now
Unlock full access