Oracle has announced the release of Java 20, which includes seven JDK Enhancement Proposals (JEPs).
According to Oracle, many of the new features are follow-ups to previous features, adding new functionality or making improvements, and all are either preview or incubating features.
Two language updates in Java 20 are the ability to nest record patterns and use pattern matching for switch expressions.
RELATED CONTENT:
Oracle makes significant changes to its Java license
Eclipse Foundation finds significant momentum for open source Java this year
There are also three features that came from Project Loom, which is a project that explores ways to improve the Java Virtual Machine (JVM). A new incubating feature, scoped values, will enable sharing of immutable data within and across threads. Virtual threads are in their second preview, and these threads will significantly reduce effort associated with writing, maintaining, and observing high-throughput concurrent applications. And finally structured concurrency treats multiple threads as a single unit, which will help streamline error handling and cancellation.
The final grouping of updates comes from Project Panama, which is an initiative to improve connectivity between the JVM and native code. The foreign function and memory API will allow Java applications to call native libraries and process data without using the Java Native Interface, contributing to increased ease-of-use, performance, and safety. And the new Vector API is used to express vector computations that will compile at runtime.
“For more than 25 years, Java has empowered developers to design and build the next generation of robust, scalable, and secure applications,” said Georges Saab, senior vice president of development, Java Platform and chair, OpenJDK Governing Board, Oracle. “The innovative new enhancements in Java 20 reflect the vision and invaluable efforts the global Java community has contributed throughout Java’s existence. With the support provided by Oracle’s ongoing Java technology leadership and community stewardship, Java has never been more relevant as a contemporary language and platform that helps developers improve productivity.”