What’s New in Java 11

What’s New in Java 11

Duration: 3 Days

Description

This course focuses on the features and enhancements introduced in Java 11, a long-term support (LTS) release that brought significant improvements to the language and standard library. Participants will explore new String methods, local-variable syntax for lambda parameters, the HTTP Client API, updates to the Stream and Optional APIs, and changes to the Java platform module system. The course also covers important JDK changes including the removal of Java EE modules and the introduction of new tools for running single-file source code programs.

Audience

This course is intended for Java developers who are proficient with Java 8 features and want to understand the evolution of the language through Java 11. It is ideal for teams planning migration to Java 11 LTS, developers maintaining modern Java applications, and professionals who want to stay current with Java platform developments.

Objectives

  • Utilize new String methods for improved text processing and manipulation
  • Apply var in lambda parameters for cleaner functional code
  • Make HTTP requests using the new standard HTTP Client API
  • Leverage enhancements to the Stream, Optional, and Collection APIs
  • Understand the Java Platform Module System changes and implications
  • Run single-file Java programs without explicit compilation
  • Recognize removed and deprecated APIs and plan migration strategies
  • Apply performance improvements and garbage collector updates

Prerequisites

Participants must have strong Java 8 knowledge, including lambda expressions, streams, functional interfaces, and the modern Date and Time API. Professional Java development experience is expected. Familiarity with Java 9 and 10 features is beneficial but not required.

Course Outline

Module 1: Overview of Java 11

  • Java 11 as a Long-Term Support Release
  • Release Cadence and Versioning Changes
  • Key Themes in Java 9-11
  • Removed and Deprecated Features

Module 2: Language Enhancements

  • Local-Variable Syntax for Lambda Parameters
  • Lambda Expression Improvements

Module 3: New String Methods

  • isBlank, lines, strip, and stripLeading/stripTrailing
  • repeat Method
  • String Processing Enhancements

Module 4: HTTP Client API

  • Overview of the HTTP Client
  • Creating HTTP Clients and Requests
  • Synchronous and Asynchronous Request Handling
  • Working with HTTP Responses
  • WebSocket Support

Module 5: Collection and Stream API Updates

  • Collection.toArray(IntFunction)
  • Predicate.not Method
  • Stream and Optional Enhancements

Module 6: File I/O Enhancements

  • Reading and Writing Strings to Files
  • Path and Files API Updates

Module 7: Running Java Programs

  • Single-File Source Code Execution
  • Shebang Support for Java Scripts

Module 8: JVM and Platform Changes

  • Epsilon and ZGC Garbage Collectors
  • Flight Recorder
  • Module System Updates
  • Removed Java EE and CORBA Modules
  • Migration Considerations