A Stream<T> is a sequence of elements that supports a chain of operations to produce a result or a side effect.
It does not store data. It carries data from a source through a pipeline of steps.
Stream<T> lives in the java.util.stream package and was introduced in Java 8.
import java.util.stream.Stream;It is a generic interface. The type parameter T is the type of each element flowing through the pipeline.
Stream<String> // a stream of strings
Stream<Integer> // a stream of integers
Stream<Employee>// a stream of objects| Next: B Characteristics Of A Stream.md |