Which Java version introduced the Stream API?

The story behind the answer

Java 8 introduced the Stream API.

The API arrived with Java 8, released in 2014, as part of a major move toward functional-style programming. It provides the java.util.stream package and lets developers describe operations such as filtering, mapping, sorting, and reducing collections as a processing pipeline.

A stream is not a data structure and does not store a second copy of a collection. Instead, it represents a sequence of elements on which operations can be performed. Intermediate operations such as filter and map are generally lazy, while terminal operations such as forEach, collect, or reduce trigger processing. This design can make collection code more declarative than equivalent loops.

The Stream API is commonly confused with input/output streams such as InputStream and OutputStream. Those APIs handle byte or character data; Java 8 streams handle sequences of objects or primitive values for computation. Java 8 also introduced lambda expressions and the java.util.function package, which supply much of the concise syntax streams use.

Source: Wikipedia · fact-checked Sept. 2026

Add question to a list

Choose a list to keep this question in: