Oracle recently released the latest version of its Java programming language and development platform, Java. The latest Java SDK 21 version has added many stability and performance enhancements.
Java SDK 21 features thousands of performance, stability and security improvements, among others, according to Oracle. These improvements should make it even easier for developers to use the programming language and development platform to optimize their productivity and bring about innovation and growth within their companies, Oracle indicates.
New updates
More specifically, version 21 includes language improvements to the OpenJDK project Amber. These include string templates, record patterns, pattern matching for switch, unnamed patterns and variables, and unnamed classes and main methods for instances.
Project Panama receives improvements in terms of an API for external functions, allowing Java-based programs to interact with code and data from outside the Java runtime. Also now introduced within this is a Vector API that expresses vector calculations. These are reliably compiled at runtime into vector instructions on supported processor architectures.
For Project Loom, Java 21 added enhancements such as virtual threads, “scoped” values and structured concurrency.
Performance improvements
Finally, the programming language and development platform performance enhancements have been implemented, such as generational ZGC. This functionality improves application performance by extending the Z Garbage Collector (ZGC) to retain separate generations of young and old objects. Ultimately, this should give developers more productivity.
Java 21 is available immediately. Moreover, this version is now Oracle OCI-capable, which makes it the first hyperscaler platform. The community and its ecosystem have also recently embraced Java 21.
Also read: Microsoft and Oracle extend partnership with Oracle Database@Azure