Looking at Java 21: Intro
Java 21 has recently entered “rampdown phase one”, and is planned for general availability in September! This new LTS release comes with many new features, that’s why I want to take the next few weeks to take a deeper look at the ones that excite me the most!
There are 15 JEPs included in Java 21:
- String Templates (Preview) (JEP 430)
- Sequenced Collections (JEP 431)
- Generational ZGC (JEP 439)
- Record Patterns (JEP 440)
- Pattern Matching for
switch
(JEP 441) - Foreign Function & Memory API (Third Preview) (JEP 442)
- Unnamed Patterns and Variables (Preview) (JEP 443)
- Virtual Threads (JEP 444)
- Unnamed Classes and Instance Main Methods (Preview) (JEP 445)
- Scoped Values (Preview) (JEP 446)
- Vector API (Sixth Incubator) (JEP 448)
- Deprecate the Windows 32-bit x86 Port for Removal (JEP 449)
- Prepare to Disallow the Dynamic Loading of Agents (JEP 451)
- Key Encapsulation Mechanism API (JEP 452)
- Structured Concurrency (Preview) (JEP 453)
There’s something for everyone on this list, even though some of the JEPs are still previews. But preview or not, each of them is worth checking out in some form, although I don’t know if I’m going to cover all of them in detail.
Stay tuned for the next article about “String Templates”!
Interested in using functional concepts and techniques in your Java code?
Check out my book!
Available in English, Polish, Korean, and soon, Chinese.
Resources
Looking at Java 21
- Intro
- String Templates (JEP 430)
- Simpler Main Methods and Unnamed Classes (JEP 445)
- Sequenced Collections (JEP 431)
- Scoped Values (JEP 446)
- Switch Pattern Matching (JEP 441)
- Feature Deprecations (JEP 449, 451)
- Record Pattern Matching (JEP 440)
- Generational ZGC (JEP 439)
- Virtual Threads (JEP 444)
- The Little Things