Features of Java 8
Java 8 is another important milestone release in the history of Java. Along with many other features, such as opening interfaces for the first time to allow static and default method definition, the optional and forEach were introduced; the two core additions are streams and Lambda expressions.
Streams can be thought of as pipelines of data, in which we can perform two types of operations: intermediate and terminal. Intermediate operations are the ones that are applied on the stream to transform data, but the result is still a stream; for example, map and filter. For example, in a stream of integer data, with an apply function such as filter out all even numbers or add N to each number, we end up having a resultant stream. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access