JDK 14: The new features in Java 14


Java 13 only just shipped September 17, but work has already begun on its successor, Java 14. One official feature has already been set and another will likely be made official soon. 

Oracle on September 17 said switch expressions are expected to go final in Java Development Kit 14 (JDK 14). In addition, a JDK Enhancement Proposal (JEP) for JDK 14, posted in openjdk.java.net, would upgrade Java’s mapped byte buffers to support non-volatile memory. 

If JDK 14 follows the six-month release cadence set for Java, the upgrade would arrive as a production release in March 2020. As a non-LTS (long term support) release, JDK 14 would be supported for six months before making way for a successor release.

Switch expressions simplify coding by extending switch so that it can be used as either a statement or an expression. Switch expressions are expected to be a permanent feature in JDK 14, after being previewed in both JDK 12 and JDK 13. Switch expressions also prepare for the use of pattern matching in switch, which allows developers to conditionally extract components from objects more concisely and safely. 

Until the formal proposal of switch expressions arrives, non-volatile mapped byte buffers remains the lone officially proposed feature targeting JDK 14. Non-volatile mapped byte buffers would add new JDK-specific file mapping modes that allow the FileChannel API to be used to create MappedByteBuffer instances that refer to non-volatile memory (NVM).



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *