Migrating to Java 17 | Java 17 New Features & Skills

Gain the Java 17 Skills Required to Develop Maintainable Code that Easily Scales into Multi-Core Environments

TT2135

Introductory and Beyond

2 Days

Course Overview

Migrating to Java 17 is a two day hands on course that willprovide you with the updated skills you need 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.

There have been a lot of changes in the Java programming language since the release of Java 8 in March of 2014. This courses explores 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.

Course Objectives

This course combines expert lecture, real-world demonstrations and group discussions with machine-based practical labs and exercises.  Working in a hands-on learning environment led by our expert instructor, you will learn:

  • The difference between LTS and non-LTS versions
  • The (dis)advantages of preview features
  • How to implement data objects using the new record type
  • How to improve memory consumption through the use of compact Strings
  • The use of the new strip and inBlank methods of the String class
  • To define and use multi-line text blocks
  • To use switch expressions to assign value
  • To appy the yield keyword in a switch statement
  • The concept of pattern matching
  • How to 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
  • How to define and use modules
  • How to use the ServiceLoader mechanism
  • How to 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

Course Prerequisites

This is an intermediate- level Java programming course, designed for experienced Java 8 developers who wish to get up and running with Java 11 immediately.  Attendees should have a working knowledge of developing Java 8 applications.

Take Before: Students sholuld have incoming skills equivalent to or should have attended this course as a pre-requsite:
•    TT2104-J8 Fast Track to Java 8 Programming for OO Experienced Developers

Please see the Related Courses tab for Pre-Requisite course specifics and links, links to similar courses you might review as an alternative, as well as suggested Next-Step Follow-On Courses and Learning Path recommendations.

 

Course Agenda

Session: Introducing 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

Lesson: Records

  • Data objects in Java
  • Introduce records as carrier of immutable data
  • Defining records
  • The Canonical constructor
  • Compact constructors

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

Lesson: Switch Expressions

  • Switch Expressions
  • Using yield
  • Discuss switch fall through

Lesson: Pattern Matching

  • Pattern Matching for instanceof
  • Scope of variable when using pattern matching
  • Refining Patterns in switch
  • Dominance of pattern labels

Lesson: Sealed Classes

  • Introduce sealed classes
  • The sealed and permits modifier
  • Sealed interfaces
  • Sealed classes and pattern matching

Lesson: Exception Handling

  • Enhanced try-with-resources
  • Helpful NullpointerExceptions
  • Excluding parameter names in error messages

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

Lesson: Working with Modules

  • Open modules for reflection
  • Encapsulation and loose coupling
  • Utilizing the ServiceLoader
  • The 'provides' and 'with' reserved words

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

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

Lesson: Local Variable Type Inference

  • Explain type inference
  • Infering types of local variables
  • The var reserved type name
  • Benefits of using var
  • Backward compatibilty

Lesson: More Updates

  • private methods in interfaces
  • The forRemoval and since attributes of the Deprecated annotation
  • CompactNumberFormat
  • Enhanced Pseudo-Random Number Generators

Course Materials

Each participant will receive a detailed Student Guide with course notes, code samples, software tutorials, step-by-step written lab instructions, diagrams and related reference materials and resource links. Students will also receive the project files (or code, if applicable) and solutions required for the hands-on work. Any courseware of lab materials provided in a cloud (if applicable) will also be made available to you separately.

Raise the bar for advancing technology skills

Attend a Class!

Live scheduled classes are listed below or browse our full course catalog anytime

Special Offers

We regulary offer discounts for individuals, groups and corporate teams. Contact us

Custom Team Training

Check out custom training solutions planned around your unique needs and skills.

EveryCourse Extras

Exclusive materials, ongoing support and a free live course refresh with every class.

Attend a Course

Please see the current upcoming available open enrollment course dates posted below. Please feel free to Register Online below, or call 844-475-4559 toll free to connect with our Registrar for assistance. If you need additional date options, please contact us for scheduling.

Course Title Days Date Time Price
Migrating to Java 17 | Java 17 New Features & Skills 2 Days Aug 8 to Aug 10 10:00 AM to 06:00 PM EST $1,995.00 Enroll
Migrating to Java 17 | Java 17 New Features & Skills 2 Days Oct 17 to Oct 19 10:00 AM to 06:00 PM EST $1,995.00 Enroll
Migrating to Java 17 | Java 17 New Features & Skills 2 Days Dec 5 to Dec 7 10:00 AM to 06:00 PM EST $1,995.00 Enroll

Fresh Spring Savings!
Buy One Get One Free!

Enroll by May 31 in any TWO public classes in 2022 for the price of ONE! 

Click for Details & Additional Offers

Learn. Explore. Advance!

Extend your training investment! Recorded sessions, free re-sits and after course support included with Every Course
Trivera MiniCamps
Gain the skills you need with less time in the classroom with our short course, live-online hands-on events
Trivera QuickSkills: Free Courses and Webinars
Training on us! Keep your skills current with free live events, courses & webinars
Trivera AfterCourse: Coaching and Support
Expert level after-training support to help organizations put new training skills into practice on the job

The voices of our customers speak volumes

Special Offers
Limited Offer for most courses.

SAVE 50%

Learn More