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

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.

Retail Price: $1,995.00

Next Date: Request Date

Course Days: 3


Request a Date

Request Custom Course


At Course Completion

Students who attend Transitioning to Java 17 will leave this course armed with the required skills to develop maintainable code that easily scales into multi-core environments. Geared for developers currently working in Java 8 or Java 11 who need to migrate their skills or applications to Java 17, this course will teach students everything they need to successfully master and implement the latest features and benefits of Java 17 and become an effective Java 17 developer.

This 'skills-centric' course is about 50% hands-on lab and 50% lecture, designed to train attendees in core next-level Java development skills, coupling the most current, effective techniques with the soundest industry practices.

Working within in an engaging, hands-on learning environment, guided by our expert team, attendees will learn:

· The difference between LTS and non-LTS versions

· What are the (dis)advantages of preview features

· To implement data objects using the new record type

· Improve memory consumption through the use of compact Strings

· The use of the new strip and inBlank methods of the String class

· Define and use multi-line text blocks

· Use switch expressions to assign value

· To appy the yield keyword in a switch statement

· Understand the concept of pattern matching

· Apply pattern matching for instanceof

· All about sealed classes and interfaces

· Enhancements made to the try-with-resources construct

· To use the new Helpfull Nullpointer exceptions

· The thoughts behind the Java Modular system

· Define and use modules

· Use the ServiceLoader mechanism

· Use the jdeps, jlink and jpackage tools to define self-contained Java applicaitons

· Methods added to the Collection and Stream API since Java 8

· The use of the var keyword and local variable type inference

· Private methods in interfaces

· The updated Deprecated method

· CompactNumberFormat

 

Audience Profile

The content covered in the class assumes a working knowledge of Java 8.

 

Prerequisites

TT2108 - Transitioning to Java 8 - When not familiar with Lambda expressions or any of the new APIs introduced in Java 8


Outline

Session: Introducting Java 17

Lesson: Versions and Features

· Overview of Java versions since Java 8

· (Non) LTS releases

· Preview features

· Java Language Specifications

· Java Specification Requests

· Java Enhancement Proposals

· Lab: Setup IntelliJ for using Maven

Lesson: Records

· Data objects in Java

· Introduce records as carrier of immutable data

· Defining records

· The Canonical constructor

· Compact constructors

· Lab: Records

Lesson: String and Text Blocks

· Discuss the definition of whitespace in Java

· Introduce the strip() methods of the String class

· The isBlank() and repeat() methods introduced in Java 11

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

· Compact strings

· Introducing Text Blocks

· Indentation in text blocks

· Lab: Text Blocks

Lesson: Switch Expressions

· Switch Expressions

· Using yield

· Discuss switch fall through

· Lab: Switch Expressions

Lesson: Pattern Matching

· Pattern Matching for instanceof

· Scope of variable when using pattern matching

· Refining Patterns in switch

· Dominance of pattern labels

· Lab: Pattern Matching

Lesson: Sealed Classes

· Introduce sealed classes

· The sealed and permits modifier

· Sealed interfaces

· Sealed classes and pattern matching

· Lab: Sealed Classes

Lesson: Exception Handling

· Enhanced try-with-resources

· Helpful NullpointerExceptions

· Excluding parameter names in error messages

· Lab: Helpful Nullpointers

Session: Java Modular System

Lesson: Introducing the Java Modular System

· Introduce the Java Modular System

· Platform modules

· The java.base Module

· Modular Development

· (Not) using Internal APIs

Lesson: The Module Descriptor

· The module descriptor module-info.java

· Defining module dependencies

· Readability and Accessibility

· Transitive dependencies and implied readability

· Exports and Accessibility

· Qualified exports

· Validity of the Module system

· Lab: Introduction to Modules

Lesson: Working with Modules

· Open modules for reflection

· Encapsulation and loose coupling

· Utilizing the ServiceLoader

· The 'provides' and 'with' reserved words

· Lab: Modules and the ServiceLoader

· Lab: Modules Reflection

Lesson: jdeps, jlink and jpackage

· Module Path vs Class Path

· Unnamed modules

· Using jdpes to discover class and module dependencies

· Using jlink to create Self-Contained Java Applications

· Using jpackage to Create Native Java App Installers

· Lab: Creating Applications

Session: Working with Java 17

Lesson: Updates to Collections and Streams

· Introduce enhancements to the Collection API

· Unmodifiable Collections

· Introduce new functionality of the Stream API

· Explain new intermediate Stream operations (takeWhile, dropWhile)

· Collecting Stream elements into list using the new toList method

· Lab: Collection and Stream updates

Lesson: Local Variable Type Inference

· Explain type inference

· Infering types of local variables

· The var reserved type name

· Benefits of using var

· Backward compatibilty

· Lab: Variable type inference

Lesson: More Updates

· private methods in interfaces

· The forRemoval and since attributes of the Deprecated annotation

· Multi-release JAR files

· Javadoc updates

· Class-Data Sharing

· Application Class-Data

· CompactNumberFormat

· Lab: Application Class-Data sharing

· Lab: MrJar files



Sorry! It looks like we haven’t updated our dates for the class you selected yet. There’s a quick way to find out. Contact us at 502.265.3057 or email info@training4it.com


Request a Date