What you’ll learn in this training
In this one-day course, you’ll learn the fundamentals of the Java Streams API – with clear explanations, practical examples, and lots of hands-on exercises.
You’ll discover how Streams differ from traditional Collections – and why they’re such a powerful tool for modern data processing in Java.
Through practical scenarios, we’ll explore the structure of a stream pipeline – from the data source, through intermediate operations like map(), filter(), and flatMap(), to final processing with collect(), reduce(), and collecting results into a map with toMap(). You’ll learn when each operation makes sense – and where the typical pitfalls lie.
A special focus is placed on understanding the underlying concepts: What happens when? What actually gets executed – and what doesn’t? What exactly does Lazy Evaluation mean – and what do you need to watch out for in everyday project work?
By the end of the day, you’ll be able to confidently use streams, aggregate complex data operations with collectors, combine values with reduce(), and apply functional programming effectively in your projects.
👉 Already familiar with streams and ready to go deeper? Check out Java Streams Advanced – Gatherers, Spliterators & More.
👉 Want to cover the full range of the Stream API in one go? Then the combined course Java Streams Basics + Advanced is ideal for you.
💡 Not sure yet whether streams are the right fit for you? My article Java Streams (with Examples) gives you a taste of what the Stream API can do.
Target audience
This course is designed for Java developers who want to systematically learn streams and functional programming from the ground up.
Whether you’ve avoided streams, only scratched the surface, or want to refresh your knowledge – this course will help you build a solid foundation for productive use in real-world projects.
If you’ve preferred traditional loops because streams seemed too abstract: after this course, you’ll know when and how to use them effectively.
Agenda
The course alternates between short theory segments, hands-on code examples, and interactive exercises – so you learn the fundamentals of the Stream API in a well-structured and practical way.
Functional Programming in Java:
- Lambda expressions: syntax, types, and usage
- Functional interfaces (
Consumer, Supplier, Function, Predicate, etc.) - Method references: static, instance, constructor references
- Hands-on exercises: Lambda expressions vs. anonymous classes
Stream Basics:
- What is a stream? Conceptual differences from collections
- Anatomy of a stream pipeline: Source → Intermediate Operations → Terminal Operations
- Lazy evaluation and its implications
- Creating streams: from collections, arrays, files, ranges
- Primitive streams:
IntStream, LongStream, DoubleStream - Hands-on exercises: First stream pipelines with primitive streams
Intermediate Operations Deep Dive:
- Transformations with
map(), flatMap(), filter() - Selection and sorting:
distinct(), sorted(), limit(), skip() - Debugging with
peek() – used correctly - Chaining operations and performance aspects
- Hands-on exercises: More complex data processing
Terminal Operations:
collect() – the most versatile terminal operator- Built-in collectors:
toList(), toSet(), toMap() – stream to map made easy Stream.toList() and how it differs from Collectors.toList()forEach(), forEachOrdered()reduce() for aggregations- Finding operations:
findFirst(), findAny() – understanding and correctly using the Optional return type - Matching operations:
allMatch(), anyMatch(), noneMatch() - Hands-on exercises: Terminal operations with standard collectors
Agenda as PDF