Paul Krill
Editor at Large

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.

circular hopscotch numbers in blue and yellow
Credit: Thinkstock

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 finalize capabilities such as record patterns.

[ UPDATE: JDK 20: The new features in Java 20 ]

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.
  • 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.
  • Value objects, to enhance the Java object model with class instances that have only final instances and lack object identity.
  • 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.
  • An API for asynchronous stack traces, which would provide information on Java and native frames.
  • 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.
  • Another JDK 19 preview feature, virtual threads, serves as lightweight threads to make it easier to write and maintain high-throughput concurrent applications.
  • 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.
  • Structured concurrency, in an incubator phase in JDK 19, would simplify multithreaded programming via an API.
  • 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.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a β€œBest Technology News Coverage” award from IDG.

More from this author