Skip to main content

Functional Java for Javas

Functional Java refers to the lambda expressions, functional interfaces and Stream API added in Java 8, along with the modern date-time and file I/O classes. Together they let you process data declaratively instead of writing manual loops. It sits in the Core Libraries stage and shapes how modern Java is written.

Stage: Core Libraries · Part of the Java roadmap · Last reviewed 19 November 2026

What to learn in Functional Java

Functional Java interview questions

What is the difference between map and flatMap in Java streams?

map transforms each element into exactly one new element. flatMap transforms each element into a stream and then flattens those streams into one. Use flatMap when each item produces multiple results, for example turning a list of orders into a single stream of line items.

Are Java streams lazy, and what triggers execution?

Intermediate operations such as filter and map are lazy and only describe the pipeline. Nothing runs until a terminal operation such as collect, forEach or count is called. A stream can also be consumed only once, so reusing it throws an exception.

Where Functional Java fits in the Java roadmap

Functional Java belongs to the Core Libraries stage (intermediate level), which takes about 32 hours. Everyday APIs.

Back to the full Java roadmap