Migrating from Java 8 to Java 17 | Java 17 New Features & Skills

Upgrade your skills with 'Migrating from Java 8 to Java 17', designed for developers eager to master Java’s latest features and create scalable, maintainable applications.

Course Thumbnail

Essential Skills Gained

Checkmark

Understand the differences between Java 8 and Java 17 features.

Checkmark

Implement key Java 17 features such as records, sealed classes, and switch expressions.

Checkmark

Leverage modularization and new Java tooling for efficient applications.

Checkmark

Enhance code maintainability and performance using updated Java APIs.

Format

  • Instructor-led
  • 3 days with lectures and hands-on labs.

Audience

  • Java Developers
  • Software Engineers
  • Backend Developers
  • Technical Leads

Description

There have been a lot of changes in the Java programming language since the release of Java 8 in March of 2014. This two day courses focusses on the changes that will be most noticable for Java developers who will make the transition from Java 8 to Java 17. It not only covers the changes to the programming language like the new var keyword, records and sealed classes, it will also cover the Java modular system, introduced in Java 9 and the tooling that has been developed since then to allow the creation of self-contained Java applications.

Calendar icon

Upcoming Course Dates

No upcoming dates. Please check back later.

Course Outline

Download PDF

Introducting Java 17

  1. Overview of Java versions since Java 8

  2. (Non) LTS releases

  3. Preview features

  4. Java Language Specifications

  5. Java Specification Requests

  6. Java Enhancement Proposals

  7. Lab: Setup IntelliJ for using Maven

Records

  1. Data objects in Java

  2. Introduce records as carrier of immutable data

  3. Defining records

  4. The Canonical constructor

  5. Compact constructors

  6. Lab: Records

String and Text Blocks

  1. Discuss the definition of whitespace in Java

  2. Introduce the strip() methods of the String class

  3. The isBlank() and repeat() methods introduced in Java 11

  4. Using the lines() method to construct a Stream instance using a String

  5. Compact strings

  6. Introducing Text Blocks

  7. Indentation in text blocks

  8. Lab: Text Blocks

Switch Expressions

  1. Switch Expressions

  2. Using yield

  3. Discuss switch fall through

  4. Lab: Switch Expressions

Pattern Matching

  1. Pattern Matching for instanceof

  2. Scope of variable when using pattern matching

  3. Refining Patterns in switch

  4. Dominance of pattern labels

  5. Lab: Pattern Matching

Sealed Classes

  1. Introduce sealed classes

  2. The sealed and permits modifier

  3. Sealed interfaces

  4. Sealed classes and pattern matching

  5. Lab: Sealed Classes

Exception Handling

  1. Enhanced try-with-resources

  2. Helpful NullpointerExceptions

  3. Excluding parameter names in error messages

  4. Lab: Helpful Nullpointers

Java Modular System

Introducing the Java Modular System

  1. Introduce the Java Modular System

  2. Platform modules

  3. The java.base Module

  4. Modular Development

  5. (Not) using Internal APIs

The Module Descriptor

  1. The module descriptor module-info.java

  2. Defining module dependencies

  3. Readability and Accessibility

  4. Transitive dependencies and implied readability

  5. Exports and Accessibility

  6. Qualified exports

  7. Validity of the Module system

  8. Lab: Introduction to Modules

Working with Modules

  1. Open modules for reflection

  2. Encapsulation and loose coupling

  3. Utilizing the ServiceLoader

  4. The 'provides' and 'with' reserved words

  5. Lab: Modules and the ServiceLoader

  6. Lab: Modules Reflection

jdeps, jlink and jpackage

  1. Module Path vs Class Path

  2. Unnamed modules

  3. Using jdpes to discover class and module dependencies

  4. Using jlink to create Self-Contained Java Applications

  5. Using jpackage to Create Native Java App Installers

  6. Lab: Creating Applications

Working with Java 17

Updates to Collections and Streams

  1. Introduce enhancements to the Collection API

  2. Unmodifiable Collections

  3. Introduce new functionality of the Stream API

  4. Explain new intermediate Stream operations (takeWhile, dropWhile)

  5. Collecting Stream elements into list using the new toList method

  6. Lab: Collection and Stream updates

Local Variable Type Inference

  1. Explain type inference

  2. Infering types of local variables

  3. The var reserved type name

  4. Benefits of using var

  5. Backward compatibility

  6. Lab: Variable type inference

More Updates

  1. private methods in interfaces

  2. The forRemoval and since attributes of the Deprecated annotation

  3. Multi-release JAR files

  4. Javadoc updates

  5. Class-Data Sharing

  6. Application Class-Data

  7. CompactNumberFormat

  8. Lab: Application Class-Data sharing

  9. Lab: MrJar files

Your Team has Unique Training Needs.

Your team deserves training as unique as they are.

Let us tailor the course to your needs at no extra cost.