Today, at its Code One conference, Oracle announced that Java 13 is now officially available.
Like every other Java release since Java 6, it was available in early access preview prior to the official release. These previews give developers the opportunity to try the new version out before using it in their production code.
“[This has been useful] because it gives people a way to try out the current state of the version and give us feedback, both on features, but also if there are particular bugs that may be affecting them and their application,” said Georges Saab, vice president of engineering for Java Standard Edition at Oracle.
RELATED CONTENT: Jakarta EE now operates under open, community-driven process
According to Oracle, the goal with Java 13 was to improve the performance, stability, and security of both the Java SE Platform and the Java Development Kit (JDK).
Java 13 introduces three new Java Enhancement Proposals: dynamic CDS archives, the ability to uncommit unused memory, and a reimplementation of the Legacy Socket API.
Dynamic CDS archives improve the usability of the Application Class-Data Sharing feature. This feature will help improve startup times.
Java 13 allows unused heap memory to be returned to the operating system or container. According to Saab, this feature is about making sure that “the JVM is being a responsible and friendly citizen, not assuming that it’s the only thing that’s going to be running on a particular server or cloud.”
Finally, Oracle has reimplemented the Legacy Socket API. Now the API is much easier to maintain, debug, and prepare for user-mode threads, the company said. “Basically, this is about making sure that as we are changing the threading model in order to increase Java scalability,” said Saab.
This release includes two preview features as well. Preview features are fully implemented and made available for testing before being implemented in the language, allowing Oracle to gather developer feedback.
The two preview features in this release are Switch Expressions and text blocks. Switch Expressions allows switch to be used either as a statement or an expression. According to Oracle, this feature simplifies coding and lays the groundwork for future features like pattern matching. Text blocks are multi-line string literals that automatically get formatted in a predictable way, which gives developers more control over code format, the company explained.