Migrating Java 11 to Java 21 | Java 21 New Features and Skills
Objective
This course is rich with hands-on activities and examples, combining robust real-world hands-on labs with expert instruction, engaging activities and group discussions and review. You'll learn and practice new skills under the guidance of our expert instructor, who will prepare you to apply these in the job, role or project with confidence.
Working in an interactive learning environment, led by our expert facilitator, you'll explore:
- Updated Java Skills: Gain updated Java skills, enhancing employability and industry relevance.
- Efficiency in Coding: Learn techniques like Records, enhanced text handling, and sealed classes, streamlining coding practices and improving code quality.
- Adaptive Development: Seamlessly adapt from Java 11 to Java 21, ensuring effective participation in modern Java projects.
- Practical Application: Apply new skills immediately in real-world projects, increasing productivity and code quality.
- Competitive Edge: Stand out in the job market with up-to-date Java knowledge, becoming a valuable asset to organizations and potential employers.
- Mastery of Pattern Matching: Acquire proficiency in advanced Pattern Matching techniques for concise and error-reducing code.
- Effective Text Processing: Learn to handle text efficiently with Java 21's enhanced text handling features, improving application readability and user experience.
Audience
This is an intermediate- level Java programming course, designed for experienced Java 11 developers who wish to get up and running with Java 21 immediately. Attendees should have a working knowledge of developing Java 11 applications.
This course is not for non-developers, or developers new to Java.
1. Versions and Features
- Quick Review 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)
2. Records
- Data objects in Java
- Introduce records as carrier of immutable data
- Defining records
- The Canonical constructor
- Compact constructors
3. 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
4. Sealed Classes
- Introduce sealed classes
- The sealed and permits modifier
- Sealed interfaces
- Sealed classes and pattern matching
5. Switch Expressions
- Switch Expressions
- Using yield
- Discuss switch fall through
6. Pattern Matching
- Pattern Matching for instanceof
- Scope of variable when using pattern matching
- Refining Patterns in switch
- Dominance of pattern labels
- Pattern Matching in switch statements
- Pattern Matching and sealed classes
- Record Patterns
7. Exception Handling
- Enhanced try-with-resources
- Helpful NullpointerExceptions
- Excluding parameter names in error messages
8. Overview of Virtual Threads
- Introduce Virtual Threads
- Virtual vs System Threads
- Creating and running a Virtual Thread
- Scheduling a Virtual Thread
- Pinned Virtual Threads
Additional Topic: Time Permitting
- 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
- Deprecation of the finalize method
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