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


.NET 6 Preview Adds MAUI
22/03/2021

The second preview of .NET 6 has been released with new APIs and early builds of .NET MAUI, the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, ta [ ... ]



DataGrip 2021 Adds Azure MFA support
01/04/2021

JetBrains DataGrip has been updated with support for Azure MFA and the ability to edit data in MongoDB via its UI. This is the first of DataGrip's regular updates in 2021, hence the version number of  [ ... ]


More News

square

 



 

Comments




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