Introduction
This lesson introduces the Stream API.
We'll cover the following...
We'll cover the following...
The addition of the Stream
API was one of the major features added to Java 8. A Stream
in Java can be defined as a sequence of elements from a source that supports aggregate operations on them. The source here refers to collections or arrays that provide data to a stream.
A few important points about streams are:
-
A stream is not a data structure itself. It is a bunch of operations applied to a source. The source can be collections, arrays or I/O channels.
-
Streams don’t change the original data structure. ...