JDK 21: The new features in Java 21

Proposed features for the next long-term support release of standard Java now include a generational garbage collector, record patterns, pattern matching for switch, and a vector API.

Java 21 is brewing
jazz3311 / Shutterstock

For more features have been proposed for Java Development Kit (JDK) 21, due in September as the next long-term support release of Oracle’s standard Java implementation: generational ZGC (Z Garbage Collector), record patterns, pattern matching for switch expressions and statements, and a vector API. These join four other features previously proposed for JDK 20: sequenced collections, virtual threads, a preview of string templates, and a third preview of a foreign function and memory API.

Early-access binaries under the GPL are available at jdk.java.net. Oracle publishes new releases of standard Java every six months, with the most recent, JDK 20, having arrived March 21. The specific proposals for JDK 21 so far include:

The proposed release schedule for JDK 21 includes rampdown phases occurring June 8 and July 20. The feature set is frozen at the first rampdown phases while bug fixes continue. This is followed by initial and final release candidates on August 10 and August 24, with bug fixes still possible, followed by general availability on September 19.

As a long-term support (LTS) release, JDK 21 would get five years of Premier support and extended support until September 2031. The current LTS release is JDK 17, published in September 2021. Non-LTS releases, such as JDK 20 and JDK 19, receive only six months of premier support and no extended support.

Related:

Copyright © 2023 IDG Communications, Inc.

How to choose a low-code development platform