Menu
JDK 20: What’s next for Java?

JDK 20: What’s next for Java?

The next version of standard Java could pack features ranging from universal generics and primitive types to virtual threads and structured concurrency.

Credit: Dreamstime

With Java 19 having just arrived on September 20, Java 20 is next on the docket, expected in March 2023. The release potentially could add new functionality for universal generics, immutable data, and string templates and finalise capabilities such as record patterns.

The current OpenJDK webpage for JDK 20 lists no officially proposed features as of September 23, but that will change soon enough.

Capabilities that could make it into Java 20 include universal generics, to unify the treatment of reference and primitive types in generic code. This proposal has been floating for a while and did not make it into JDK 19.

This is in addition to extent-local variables to enable sharing of immutable data within and across threads; string templates to simplify Java programming by making it easy to express strings that include values computed at run time and value objects to enhance the Java object model with class instances that have only final instances and lack object identity.

Also, primitive classes which are special kinds of value classes that define new primitive types; sequenced collections providing a Collection interface to represent a collection with a defined encounter order and an API for asynchronous stack traces which would provide information on Java and native frames.

Other capabilities include a classfile API to parse, generate, and transform Java class files; record patterns, previewed in JDK 19, for deconstructing record values; foreign function and memory API, previewed in JDK 19 as a mechanism for Java programs to interoperate with code and data outside the Java runtime and another JDK 19 preview feature, virtual threads, which serves as lightweight threads to make it easier to write and maintain high-throughput concurrent applications.

Delving deeper, a vector API, incubated for a fourth time in JDK 19, expresses vector computations that reliably compile at runtime to optimal instructions on supported CPU architectures, achieving better performance than scalar computations.

In addition, structured concurrency, in an incubator phase in JDK 19, would simplify multi-threaded programming via an API and pattern matching for switch expressions and statements, previewed for a third time in JDK 19, to enhance Java programming.

Based on standard Java's six-month release cadence, Java 20, or Java Development Kit 20, would arrive as a production release in March 2023. Like JDK 19, JDK 20 would be a short-term release with only six months of premium support from Oracle. 

The following JDK 21 is due in a year and would be an LTS (Long Term Support) release with several years of backing by Oracle.


Tags javasoftware

Events

Brand Post

Show Comments