Skip to content

Combined Training: Java Streams Basics + Advanced

If you really want to master Java Streams, you shouldn’t split basics and advanced across two separate training blocks. Knowledge builds better in one go: what your team establishes on day one with stream pipelines, flatMap(), and collectors is immediately taken further on days two and three – with custom spliterators, groupingBy(), and the new Stream Gatherers.

In three days, this course takes your team to the full level of the Java Streams API – clearly explained, directly applicable, and cheaper than two separate bookings.

Request now – no obligation
3 days
Individual date
On-site or online
German / English
Customizable agenda
Certificate of completion

What you’ll learn in this training

This three-day combined training merges the content of two individual courses – Java Streams Basics and Java Streams Advanced – and gives you a practical and in-depth understanding of the Java Stream API: from the basics and best practices to advanced techniques like Custom Collectors and Stream Gatherers.

You could also learn Java Streams in two separate trainings – but the combined package is more efficient: three compact days instead of four, a seamless transition from basics to advanced, and a learning arc that builds on itself without interruption.

On the first day, you’ll learn the functional programming fundamentals and the structure of stream pipelines:

  • Role of intermediate and terminal operations
  • Differences from collections
  • Benefits of lazy evaluation
  • Stream creation using collections, arrays, files, and ranges

All of this is directly applied in hands-on exercises – the perfect foundation for the advanced topics on days two and three.

On days two and three, the focus shifts to efficiency, extensibility, and modern techniques:

  • Developing custom collectors (including characteristics and finisher)
  • Analyzing and optimizing stream pipelines
  • Writing custom spliterators and understanding their performance benefits
  • Infinite streams, directory walking, and file streams
  • Stream Gatherers API (since Java 22, finalized in Java 24): using built-ins, writing custom gatherers, managing state

You’ll gain a deep understanding of how streams work internally – and you’ll be equipped to confidently decide when and how to use streams effectively – and when it’s better not to.

The course concludes with a comprehensive final project, where you’ll model a real-world data processing scenario using streams – from requirements through stream design to a performant solution. We’ll review your results together and discuss best practices for production-ready stream code.

👉 Just looking for the basics? Check out Java Streams Basics – Practical Fundamentals for Beginners.

👉 Only want the advanced topics? Then Java Streams Advanced – Gatherers, Spliterators & More might be the better fit.

Target audience

This course is designed for Java developers who want to learn how to use the Streams API efficiently and elegantly – from the ground up – and then immediately take the next step: focusing on performance, extensibility, and modern features like gatherers or custom spliterators.

It’s ideal for anyone seeking a comprehensive knowledge of Java Streams in a short time – for example, during a technology upgrade, relaunch, or refactoring project.

Agenda

Day 1: Streams Basics

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()
  • forEach(), forEachOrdered()
  • reduce() for aggregations
  • Finding operations: findFirst(), findAny()
  • Matching operations: allMatch(), anyMatch(), noneMatch()
  • Hands-on exercises: Terminal operations with standard collectors

Days 2 and 3: Streams Advanced

Advanced Collectors and Reduce Operations:

  • Aggregation with reduce(): concepts and practical use
  • Debugging with peek(): when it’s helpful and when not
  • Grouping: groupingBy(), partitioningBy()
  • Downstream collectors: counting(), summingInt(), averagingDouble()
  • Nested grouping and complex aggregations
  • Joining strings with joining()
  • Hands-on: complex data analysis with collectors

Building Custom Collectors:

  • Understanding the Collector interface: supplier(), accumulator(), combiner(), finisher()
  • Characteristics: CONCURRENT, IDENTITY_FINISH, UNORDERED
  • Implementing simple custom collectors
  • More complex use cases: collecting custom objects
  • Hands-on: writing your own collectors

Stream Performance and Spliterator Basics:

  • When to use streams vs. traditional loops
  • Performance pitfalls: boxing/unboxing, long pipelines
  • Parallel streams: when they make sense, common fork/join pool
  • Memory efficiency and large datasets
  • Understanding spliterators and their role
  • Spliterator characteristics: ORDERED, SIZED, SUBSIZED, CONCURRENT, etc.
  • How characteristics affect stream performance

Legacy Code Refactoring Workshop:

  • Refactoring session: transforming loops into streams
  • Identifying good refactoring candidates
  • Step-by-step transformation of legacy code
  • Performance comparisons: before vs. after
  • Readability vs. performance trade-offs
  • When refactoring is worthwhile – and when it’s not
  • Hands-on: multiple legacy scenarios

Advanced Stream Patterns and Custom Spliterators:

  • Conditional operations with Optional
  • Error handling in streams
  • Implementing custom spliterators for specific data structures
  • Spliterator patterns: tryAdvance(), trySplit(), estimateSize()
  • Improving parallelism with custom spliterators
  • File streams: reading lines, directory walking
  • Infinite streams: generate(), iterate()
  • Hands-on: building a custom spliterator

Stream Gatherers (since Java 22, finalized in Java 24):

  • What are stream gatherers and why were they introduced
  • Understanding the Gatherer interface: integrator(), combiner(), finisher()
  • Built-in gatherers: fold(), scan(), windowFixed(), windowSliding()
  • Implementing your own gatherers
  • State management in gatherers
  • Hands-on: building gatherers for specific use cases

Integration and Architecture Patterns:

  • Streams in repository patterns
  • Functional programming principles with streams
  • Designing stream-based APIs
  • Migration strategies: legacy code to streams
  • Anti-patterns and debugging: avoiding common mistakes
  • Testing stream-based code

Workshop and Problem Solving:

  • Complex real-world project: end-to-end stream pipeline
  • Code review session: analyzing participant code
  • Performance tuning based on real examples
  • Q&A and individual use cases
  • Summary of best practices

Agenda as PDF

Is this the training that will move your team forward?

The agenda isn’t set in stone: we can align the focus, date, and format with your team.

Request now – no obligation

Why learn with me?

I’ve been working with Java for 30 years – as a developer, CTO, trainer, author, and speaker.

In that time, I’ve helped companies modernize complex Java systems, write performant code, and develop their teams sustainably.

With HappyCoders.eu, I’ve built one of the most widely read Java blogs in the German-speaking world, and I regularly speak at conferences and user groups.

My goal: to teach complex topics in a way that is understandable, practical, and immediately applicable.

Rated 4.97 out of 5 on ProvenExpert

More about me

What Training Participants Say

Sven Woltmann of HappyCoders visited us to test and understand the new features around Java 25 together.

For two days, we worked intensively on Unnamed Variables & Patterns, Stream Gatherers, Scoped Values, the Foreign Function & Memory API, and performance topics such as virtual threads without pinning.

A big thank you to Sven for the excellent preparation, the clear didactics, and the deep technical expertise. That was a training exactly to our taste.

HBT icon
HBT
Hamburger Berater Team GmbH

Content and presentation nearly flawless. I enjoyed listening throughout, learned new things, and had fun doing it.

Your confidence in answering questions along the way was impressive.

David Munck
Java training participant

Anyone who understands Java can easily follow this trainer. The exercises are well thought out and focused on the essentials.

Java training participant

A good, in-depth overview of all relevant Java features since Java 8, and the opportunity to try all of these features out yourself.

Java training participant

The overall package was very coherent and always tailored to us.

Java training participant

Very practical and good exercise examples.

Java training participant

Quick to respond to questions – a very flexible trainer.

Java training participant

Very good repo with explanations + exercises in one place.

Java training participant

Pace + depth: top-notch.

Java training participant

A very pleasant mix of theory and practice.

Java training participant

A complex topic broken down superbly.

Java training participant

All the important news from Java 9–25 was well explained.

Java training participant

The mix of knowledge, likability, and content was very pleasant.

Java training participant

Any questions?

Participation & Booking

Can individuals book this training?

This training can only be booked for teams. If you’d like to attend as an individual, I offer two courses (in German) through ppedv:

Is the training held on-site or online?

Both are possible: I can come to your company for an on-site training – anywhere in Germany, Austria, and Switzerland – or we run the training online, usually via Zoom.

How many participants are possible?

I recommend a maximum of 12 participants per training – that way I can give everyone individual attention. There is no minimum: I charge per training, not per person.

How does booking work?

The easiest way is the request form or an email to training@happycoders.eu. Right after submitting, you can book a video call via Calendly, where we discuss the details. You’ll then receive a concrete offer from me.

Prerequisites

What prior Java experience is required?

The course requires solid basic Java knowledge – ideally at least two years of practical experience. Since the first day starts with lambda expressions and functional interfaces, you don’t need to know these topics in advance. However, experience with collections and the basic Java type system is important, so we can dive straight into the stream pipeline concepts.

What technical requirements do we need?

All participants need an up-to-date IDE with at least Java 24 – I use IntelliJ IDEA myself. Java 24 or later should also be installed in the terminal, as we’ll run some of the exercises there.

Schedule & Content

What does a training day look like?

A training day consists of four 90-minute modules – six hours of net training time in total. Each module alternates between theory and practice two to three times, so you apply what you’ve just learned directly to code. There’s a short break between the first and second and between the third and fourth module, and a longer lunch break between modules two and three. We align the exact schedule with your working hours – that’s flexible.

How much time is theory, how much is practice?

About half theory, half practice: a short theory phase is followed directly by applying it to code – with examples from real projects. Listening alone doesn’t help much; the knowledge has to be used immediately for it to stick.

Can we adapt the agenda to our team?

Yes – shortening topics, weighting them differently, changing the order, or combining content from different courses: I’m happy to adapt the agenda to your team. Since that means reworking the training materials, it involves extra effort – I’ll prepare an individual offer for you.

Format & Materials

Which platform do we use for virtual training?

We usually use Zoom. If you prefer your own platform – for example, Microsoft Teams or Google Meet – I’m happy to work with that. Just let me know in advance.

Do participants receive materials to keep?

Yes. Before the training, you’ll receive the exercises as a Git repository so you can get started right away. After the training, you’ll also receive the slides – including all solutions to the exercises.

Is there a certificate of attendance?

Yes. All participants receive a certificate of attendance after the training.

Prices & Costs

What do the travel expenses include?

Travel expenses are charged as a flat rate – depending on the training location and the number of overnight stays required. The exact amount is part of the individual offer I’ll send you.

Are there discounts for booking multiple trainings?

Yes. For multiple booked trainings or follow-up bookings, I can offer a volume discount. We’ll discuss this in the video call, and I’ll include it in the offer.

Is this a good fit for your team?

Just write to me – I usually reply within one business day.
Or book a free video call right away, and we’ll discuss everything important.

Request now – no obligation

Search