June 2025
Intermediate to advanced
1129 pages
53h
English
Together with lambda expressions on the language side, an entire new library was implemented in Java 8 that makes processing datasets easy called the Stream API . At the core of the Stream API are operations to filter, map, and reduce the data in collections.
The Stream API is used in a functional style, and programs can thus be quite compact. The individual methods of the Stream API are all presented in detail in this section, each shown in the following example:
Object[] words = { " ", '3', null, "2", 1, "" };Arrays.stream( words ) // Creates new stream .filter( Objects::nonNull ) // Leave non-null references in the stream .map( Objects::toString ) // Convert objects to strings ...
Read now
Unlock full access