Back to Courses
AI033 Professional

Modern Java in Action

A comprehensive guide to the features of modern Java (versions 8, 9, 10, and 11), focusing on lambdas, streams, functional programming, and reactive programming techniques.

4.8
63.0h
1093 students
0 likes
Artificial Intelligence
Start Learning

Lessons

Lesson

This lesson explores the evolution of Java in response to the shift from single-core to multicore processor architectures. Students will learn to leverage modern features like the Stream API, Lambda expressions, and the Java Platform Module System to transition from sequential processing to efficient, parallelized data execution.

This lesson explores the limitations of hardcoding business logic and introduces behavior parameterization as a strategy to reduce code duplication and technical debt. Students will learn to move beyond simple value parameterization to create more flexible, maintainable, and reusable code structures.

This lesson explores the transition from verbose anonymous classes to concise lambda expressions in Java, focusing on the functional paradigm and behavioral parameterization. Students will learn to implement lambda syntax, utilize functional interfaces, and refactor imperative code to improve readability and reduce boilerplate.

This lesson explores the evolution of Java data processing, highlighting the shift from imperative external iteration to declarative internal iteration using Streams. Students will learn how Streams improve code readability, enable efficient parallelization, and utilize lazy evaluation to optimize data computation.

This lesson explores the transition from external to internal iteration in Java, focusing on how the Stream API enables declarative data processing. You will learn to master transformation operations like filter and map while understanding how lazy evaluation and library-led optimizations improve performance and code readability.

This lesson explores mutable reduction in Java Streams, focusing on how the collect operation efficiently accumulates stream elements into mutable containers using predefined collectors. Students will learn to replace imperative loops with declarative stream pipelines to improve code maintainability, performance, and thread safety when processing large datasets.

This lesson explores the transition from sequential to parallel stream processing in Java, focusing on how internal iteration and declarative parallelism allow the JVM to distribute tasks across multi-core architectures. Students will learn to evaluate the trade-offs between parallel execution and overhead, while mastering the functional reduction process and the mechanics of the ForkJoinPool.

This lesson explores modern Java Collection API enhancements, focusing on the shift from verbose external iteration to efficient internal iteration using factory methods and Spliterators. Students will learn to leverage these tools to improve code readability, ensure data immutability, and optimize performance through parallel processing.

This lesson explores the transition from imperative, boilerplate-heavy Java to a declarative style using lambda expressions and internal domain-specific languages (DSLs). Students will learn how to refactor traditional design patterns and improve code maintainability by prioritizing domain logic over structural ceremony.

This lesson explores the design of Domain-Specific Languages (DSLs) in Java, focusing on bridging the semantic gap between technical implementation and business requirements. Students will learn to maximize code readability by utilizing lambda expressions and fluent APIs to minimize syntactic noise while enforcing domain-specific constraints.

This lesson explores the "billion-dollar mistake" of null references in Java, explaining how they subvert the type system and cause fragile, error-prone code. Students will learn to identify the risks of null-based logic and prepare to replace defensive null-checks with the more robust Optional API.

This lesson explores the evolution of Java’s date and time handling, contrasting the flawed, mutable legacy classes with the robust, thread-safe, and immutable API introduced in Java 8. Students will learn how to utilize modern classes like LocalDate and ZonedDateTime while understanding how interface evolution through default and static methods ensures backward compatibility.

This lesson explores the evolution of Java interfaces, focusing on how default methods solve the challenges of maintaining binary compatibility in legacy systems. Students will learn how to implement default and static methods to safely update interfaces without breaking existing implementations or causing runtime errors.

This lesson introduces the Java Module System (Project Jigsaw), which replaces the monolithic JDK structure with a modular architecture to improve security, encapsulation, and application footprint. Students will learn how to configure module-info.java descriptors and use the jlink tool to create optimized, custom runtime images.

This lesson explores the transition from sequential to asynchronous programming in modern application architectures, focusing on the shift toward non-blocking service orchestration. It also covers Java 9 modularization, detailing how the module system improves dependency management and encapsulation through explicit declarations.

This lesson explores the limitations of synchronous, blocking code and introduces asynchronous programming as a solution for building responsive, resilient, and elastic systems. Students will learn to implement non-blocking execution in Java using CompletableFuture to optimize performance by running independent tasks in parallel.

This lesson explores the shift from imperative, blocking I/O models to a declarative, push-based reactive paradigm designed to handle high-concurrency data streams. Students will learn to implement custom Publishers and Subscribers using the Flow API while mastering techniques to manage backpressure and avoid thread exhaustion.

This lesson explores the risks of shared mutable data, explaining how it leads to unpredictable "spooky action at a distance," architectural erosion, and concurrency issues. Students will learn to mitigate these problems by adopting functional programming principles, such as immutability and pure functions, to build more robust and thread-safe applications.

This lesson explores the transition from imperative to functional programming in Java, focusing on the core concept of referential transparency. Students will learn how to design deterministic, side-effect-free functions to improve code maintainability, thread safety, and performance through techniques like memoization.

This lesson explores how Scala reduces Java's boilerplate through a blend of object-oriented and functional programming features, such as concise class definitions, singletons, and string interpolation. Students will learn how these declarative syntax improvements and the emphasis on immutability better support modern multicore development while maintaining full interoperability with the Java ecosystem.

This lesson explores the evolution of Java, focusing on how functional programming, the Stream API, and the Java Module System (JPMS) enable modern, scalable, and reactive application design. Students will learn to leverage these features to improve performance, enhance modularity, and effectively manage data streams in cloud-native environments.

Course Overview

📚 Content Summary

A comprehensive guide to the features of modern Java (versions 8, 9, 10, and 11), focusing on lambdas, streams, functional programming, and reactive programming techniques.

Master the art of modern Java with lambdas, streams, and functional-style programming.

Author: Raoul-Gabriel Urma, Mario Fusco, Alan Mycroft

Acknowledgments: Supported by the Manning Early Access Program (MEAP) readers, development editors Kevin Harreld and Dennis Sellinger, and various technical reviewers including Jason Lee and William Wheeler.

🎯 Learning Objectives

  1. Analyze Java’s evolution within the programming ecosystem and its adaptation to multicore hardware.
  2. Implement behavior parameterization using method references and lambdas to pass code as a "first-class citizen."
  3. Distinguish between internal and external iteration and explain how the Streams API facilitates parallelism.
  4. Identify how behavior parameterization solves the problem of "coping with changing requirements" in software evolution.
  5. Implement the Strategy design pattern using Predicates to filter data by abstract criteria.
  6. Reduce code verbosity by transitioning from named classes to anonymous classes and finally to lambda expressions.
  7. Identify and write valid lambda expressions using both expression and block syntax styles.
  8. Implement the execute-around pattern to improve code reusability in resource-intensive tasks.
  9. Utilize standard functional interfaces and their primitive specializations to optimize performance.
  10. Define a Java Stream and identify its primary characteristics (Declarative, Composable, Parallelizable).

Lessons