Migrating Java 11 to Java 17 | Java 17 New Features and Skills
Course Objectives
Learning Objectives
Working in an interactive learning environment, led by our expert facilitator, you’ll explore:
- Mastering Records in Java 17: Gain a thorough understanding of how to utilize Records in Java 17 for efficient data handling, enabling you to simplify data modeling and ensure more concise and readable code.
- Advanced String and Text Block Management: Develop the ability to effectively use the new String and Text Block features in Java 17. This includes mastering methods like strip(), isBlank(), and repeat(), as well as understanding the nuances of indentation in text blocks for improved text manipulation.
- Implementing Sealed Classes and Interfaces: Acquire the skills to implement sealed classes and interfaces in Java 17, enhancing your ability to create more secure, type-safe, and maintainable code.
- Utilizing Enhanced Switch Expressions and Pattern Matching: Learn to effectively use enhanced switch expressions and pattern matching for instanceof in Java 17. This skill is crucial for writing more concise and error-resistant code.
- Efficient Exception Handling Techniques: Master the enhanced exception handling features in Java 17, such as the improved try-with-resources statement and more informative NullPointerExceptions, to write more robust and reliable Java applications.
- Applying Modern Java Development Techniques: Develop the ability to apply these new Java 17 features in real-world scenarios. This includes integrating these skills into existing projects, enhancing your capacity to upgrade and modernize Java applications efficiently.
- Specific Java 17 features that are covered in the course including: Switch Expressions; Text blocks; Pattern matching for instanceof; Introducing records as carrier of immutable data
- Specific Java 21 features that are covered in the course including: Sequenced Collections; Pattern matching in Switch statements; Record Patterns
Course Prerequisites
Audience & Pre-Requisites
This is an intermediate- level Java programming course, designed for experienced Java 11 developers who wish to get up and running with Java 17 immediately. Attendees should have a working knowledge of developing Java 11 applications. This course is not for non-developers, or developers new to Java.
Course Agenda
Course Topics / Agenda
Please note that this list of topics is based on our standard course offering, evolved from typical industry uses and trends. We’ll work with you to tune this course and level of coverage to target the skills you need most. Topics, agenda and labs are subject to change, and may adjust during live delivery based on audience skill level, interests and participation.
- Versions and Features
- Quick refresh of Java versions since Java 8
- (Non) LTS releases
- Preview features
- Java Language Specifications
- Java Specification Requests
- Java Enhancement Proposals
- Tutorial: IntelliJ Community Edition 2023 QuickStart (Using Maven) (Eclipse also available – please inquire)
- Records
- Data objects in Java
- Introduce records as carrier of immutable data
- Defining records
- The Canonical constructor
- Compact constructors
- Lab: Records
- 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
- Sealed Classes
- Introduce sealed classes
- The sealed and permits modifier
- Sealed interfaces
- Sealed classes and pattern matching
- Lab: Sealed Classes
- Switch Expressions
- Switch Expressions
- Using yield
- Discuss switch fall through
- Lab: Switch Expressions
- Pattern Matching for instanceof
- Pattern Matching for instanceof
- Scope of variable when using pattern matching
- Refining Patterns in switch
- Dominance of pattern labels
- Lab: Pattern Matching
- Exception Handling
- Enhanced try-with-resources
- Helpful NullpointerExceptions
- Excluding parameter names in error messages
- Lab: Helpful Nullpointers
- 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: Creating a Multi-Release Jar file
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