Java 16 Hits General Availability
Written by Kay Ewbank   
Thursday, 18 March 2021

Java Development Kit 16 is now generally available.  Production-ready binaries under the GPL are available from Oracle; binaries from other vendors will follow shortly. Oracle has also released the new version under a commercial license for those using the Oracle JDK release as part of an Oracle product or service, or for those who want to be able to get commercial support.

The new release adds two major new features - support for Records, and Pattern Matching for the instanceof operator.

corretto

Records are classes that act as transparent carriers for immutable data, and can be thought of as nominal tuples. One reason for their addition to Java was an attempt to make the language less verbose in the hope of cutting down errors.

The addition of support for pattern matching for the instanceof operator is intended to make it possible for common logic in a program, namely the conditional extraction of components from objects, to be expressed more concisely and safely. The feature has been included as a preview feature since Java 14.

The JVM has been improved with enhanced support for concurrent thread-stack processing for the ZGC garbage collector. The processing has been moved from safepoints to a concurrent phase. The OpenJDK development team said:

"ZGC aims to make GC pauses and scalability issues in HotSpot a thing of the past. We have, so far, moved all GC operations that scale with the size of the heap and the size of metaspace out of safepoint operations and into concurrent phases. Those include marking, relocation, reference processing, class unloading, and most root processing."

Another JVM feature is elastic metaspace, a feature that returns unused HotSpot VM class-metadata (i.e. metaspace) memory to the operating system more promptly, reducing metaspace footprint. This is designed to improve memory use in applications with heavy class loading and unloading activity which until now could end up with a lot of unused space. The new scheme allocates metaspace memory in smaller chunks, and improves elasticity by returning unused metaspace memory to the operating system.

The new release also has new tools and libraries including Unix-domain socket channels and a packaging tool that allows for packaging self-contained Java applications.

corretto

More Information

JDK 16 On OpenJDK

Related Articles

Foojay - All About Java and the OpenJDK

Where's Java Going In 2020

The True State of Java and its Ecosystem

Java 15 Reaches General Availability 

Java At 25

JDK 14 Released

JDK 14 Feature Set Frozen

Where's Java Going In 2020

Java SE 13 Reaches GA

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Pure Virtual C++ 2024 Sessions Announced
19/04/2024

Microsoft has announced the sessions for Pure Virtual C++ 2024, which is taking place on April 30th 15:00 UTC. People who sign up will get access to five sessions happening on the day, alongside a ran [ ... ]



Avi Wigderson Gains Turing Award
16/04/2024

Israeli mathematician and computer scientist, Avi Wigderson, is the recipient of the 2023 ACM A.M Turing Award which carries a $1 million prize with financial support from Google.


More News

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info