Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Coursera

Modern Java - Mastering Features from Java 8 to Java 25

Packt via Coursera

Overview

Google, IBM & Meta Certificates — All 10,000+ Courses at 40% Off
One annual plan covers every course and certificate on Coursera. 40% off for a limited time.
Get Full Access
This course features Coursera Coach! A smarter way to learn with interactive, real-time conversations that help you test your knowledge, challenge assumptions, and deepen your understanding as you progress through the course. Master the modern features of Java from Java 8 to Java 25. This course will guide you through the evolution of Java, highlighting significant changes and innovations, from Lambdas and Streams to new syntax and pattern matching. You'll dive deep into hands-on labs and real-world use cases, gaining a solid understanding of modern Java features that are crucial for building efficient, maintainable applications. The course is structured to take you from the basics of Lambda expressions and functional interfaces to advanced topics like Streams API, method references, and modular programming with JPMS. By working through these topics step by step, you will also explore advanced stream processing techniques and the new HttpClient API, helping you tackle real-world programming challenges. The course is ideal for developers looking to enhance their Java skills and adopt modern techniques. Whether you’re developing new applications or refactoring legacy code, this course will make you proficient in using Java's latest features. Expect a combination of theory and practical labs to make the learning process smooth and engaging. By the end of the course, you will be able to implement Lambda expressions and functional interfaces, apply the Streams API for data processing, utilize pattern matching and sealed classes, and understand Java's modularity system for better project structure. You’ll also learn how to build real-time applications using modern Java features like HttpClient, and how to take advantage of GitHub Copilot to streamline your development process.

Syllabus

  • Getting Started
    • In this module, we will introduce you to the course framework and outline the key Java features from Java 8 to Java 21 that you will master. You will also review the pre-requisites, ensuring you have the necessary foundation and tools to succeed. This section sets the stage for an efficient and productive learning experience.
  • Getting Started Modern Java
    • In this module, we will explore the big picture of modern Java, tracing its evolution from Java 8 to Java 21. You will gain insight into why these features matter and how they impact programming practices today. This foundational overview prepares you for deeper dives in subsequent modules.
  • Local Set Up
    • In this module, we will guide you through installing Java and setting up your development environment. By the end, you'll be ready to write and run Java programs locally. This hands-on setup ensures you can follow along with the practical labs throughout the course.
  • Why Java 8?
    • In this module, we will uncover why Java 8 is a landmark release that revolutionized Java development. You will contrast imperative and declarative programming styles with practical examples, building a solid understanding of the shift that modern Java embraces.
  • Introduction to Lambda
    • In this module, we will introduce lambda expressions and their importance in writing concise Java code. You will get hands-on experience implementing common interfaces like Runnable and Comparator with lambdas, enhancing your functional programming skills.
  • Lambdas and Functional Interfaces
    • In this module, we will explore the core functional interfaces integral to Java’s lambda expressions. Through progressive labs, you will practice using Consumer, Predicate, Function, and other interfaces to write clean, functional-style Java code.
  • Constructor and Method References
    • In this module, we will deepen your understanding of concise coding by exploring method references. You will practice transforming lambda expressions into method and constructor references to write clearer, more readable Java programs.
  • Lambdas and Local Variables (Effectively Final)
    • In this module, we will examine how local variables behave inside lambda expressions. You will learn about the importance of effectively final variables and their benefits, enabling you to avoid common pitfalls when writing lambda-based code.
  • Streams API
    • In this module, we will introduce the Streams API as a powerful tool for functional-style data processing. You will understand how streams work behind the scenes and explore their advantages over conventional collection handling.
  • Stream API - Operations
    • In this module, we will engage with a wide range of stream operations through practical labs. You will transform, filter, sort, and reduce data streams, mastering the key techniques to leverage streams for efficient data manipulation.
  • Streams API - Factory Methods
    • In this module, we will focus on stream creation using factory methods. You will learn how to generate streams from various sources and patterns, equipping you to start stream-based processing in diverse contexts.
  • Streams API - Numeric Streams
    • In this module, we will explore numeric streams designed for efficient processing of primitive data types. You will perform common statistical calculations and transform between different stream types to optimize performance.
  • Streams API - Terminal Operations
    • In this module, we will delve into terminal operations that conclude stream pipelines. You will learn how to collect, group, partition, and summarize data effectively using the Streams API's rich set of collector utilities.
  • Streams API - Parallel Processing
    • In this module, we will introduce parallel streams as a means to leverage multi-core processors. You will build parallel pipelines, analyze their behavior, and understand when to use or avoid parallelization for optimal results.
  • Optional
    • In this module, we will introduce the Optional class as a robust alternative to null handling. You will learn how to create Optionals, safely retrieve values, and transform them with functional operations to write safer, cleaner code.
  • Default/Static Methods in Interfaces
    • In this module, we will explore the enhanced capabilities of interfaces with default and static methods. Through practical labs, you will implement these methods, handle multiple inheritance scenarios, and understand their impact on interface design.
  • New Date/Time APIs
    • In this module, we will cover the comprehensive Java 8 Date/Time API. You will practice working with various date and time classes, formatting/parsing, timezone conversions, and calculating differences, modernizing your time-based programming skills.
  • Base Project Setup for Exploring Java 9 and Beyond Features
    • In this module, we will guide you through establishing a foundational project setup. This will enable you to experiment seamlessly with Java 9 and later features in a well-organized environment.
  • Compact Main Function
  • Local Variable Type Inference (LVTI) Using var
    • In this module, we will introduce the ‘var’ keyword for local variable type inference. You will learn how to leverage it for concise declarations while understanding best practices and limitations to write clear, maintainable code.
  • Text Blocks
    • In this module, we will explore Text Blocks, a feature that streamlines multiline string management in Java. You will practice creating and formatting text blocks for cleaner and more readable string code.
  • Enhanced Switch
    • In this module, we will uncover the power of enhanced switch expressions. You will learn to write concise, readable switch statements with expression forms, yield usage, and exhaustiveness checks for safer code.
  • Records
    • In this module, we will introduce record classes as a succinct way to model immutable data. You will enhance records with custom logic and explore how Java automatically generates common methods for convenience.
  • Sealed Classes/Interfaces
    • In this module, we will explore sealed classes and interfaces, allowing fine-grained control over class hierarchies. You will practice defining and managing inheritance boundaries for more secure and maintainable designs.
  • Pattern Matching
    • In this module, we will cover pattern matching techniques to simplify type checks and data deconstruction. You will practice with record and guarded patterns to write expressive and maintainable conditional code.
  • Unnamed Variables
    • In this module, we will introduce unnamed variables, allowing you to cleanly ignore values in your code with the underscore (_) syntax. You’ll also learn to combine unnamed variables with pattern matching for more efficient and readable code.
  • CheckoutService Application [Real-Time Use Case]
    • In this module, we will dive into a real-time CheckoutService application. You will explore its architecture and build key features using sealed classes, consolidating your understanding of advanced Java concepts in a practical context.
  • Mastering Stream Gatherers in Java — A New Era of Stream Processing
    • In this module, we will introduce you to Stream Gatherers, a new feature for advanced stream processing. You’ll learn to use built-in methods like windowFixed() and windowSliding(), and how to create custom gatherers to fine-tune your data processing.
  • Simple Web Server
    • In this module, we will create a simple web server leveraging the new capabilities introduced in Java 18. You will get hands-on experience with lightweight HTTP handling and server setup for web-based applications.
  • New Http Client
    • In this module, we will explore the new HttpClient API for performing HTTP requests in Java. You will implement synchronous and asynchronous calls, perform testing, and handle real-world data retrieval scenarios.
  • Java Platform Module System (JPMS)
    • In this module, we will introduce the Java Platform Module System to help you create modular, maintainable applications. You will set up modular projects, handle complex dependencies, and migrate legacy codebases efficiently.

Taught by

Packt - Course Instructors

Reviews

Start your review of Modern Java - Mastering Features from Java 8 to Java 25

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.