The new version of java
As you know oracle launches Java’s new version in every 6 months, On last Tuesday 17th September 2019 oracle has released Java Standard Edition 13 Platform (Java SE 13) and its open-source reference implementation, the Java Development Kit 13 (JDK 13), at its annual Oracle Open World conference in San Francisco.
In the old world, when we had big releases every few years and those big releases tended to have big features, there was plenty of motivation to upgrade. Now the reality is, we’re not going to be seeing a lot of those big features in the future, and that’s not because we’re not innovating, it’s because those big features are going to get broken up into smaller features and delivered in phases.
List of top Java Enhancement Proposals included in this release included:
Text Blocks (Preview) (JEP 355):
Another preview language feature, this JEP is “a follow-on effort to explorations begun in JEP 326 (Raw String Literals), which was pulled back from the Java 12 release. Raw string literals can span multiple lines of source code and do not interpret escape sequences. JEP 355 proposes adding text blocks to the Java language. A text block is a multi-line string literal that avoids the need for most escape sequences, automatically formats the string in a predictable way, and gives the developer control over format when desired.
ZGC: uncommit Unused Memory (JEP 351):
This JEP will enable the Z Garbage Collector (ZGC) to return unused heap memory to the operating system. Other GCs in HotSpot, such as G1 and Shenandoah, already provide this capability. But it’s increasingly needed in things like container environments, where resources are paid by use; environments, where an application might be idle for long periods of time and, is sharing or competing for resources with many other applications; and among apps that have very different heap space requirements during its execution.
Switch Expressions (Preview) (JEP 354):
This preview language feature, which extends the switch statement so that it can be used as a statement or an expression, and both forms can use a “traditional” or “simplified” scoping and control flow behavior, was originally proposed in 2017 and offered as a preview feature in Java 12 (JEP 325). This JEP makes one change: to yield value from a switch expression, the break with value statement is dropped in favor of a yield statement.