Significant Changes in JDK 14 Release

The following are some of the changes in Java SE 14 and JDK 14:

  • Switch is extended so it can be used as either a statement or an expression, so that both forms can use either traditional case ... : labels (with fall through) or new case ... -> labels (with no fall through), with a further new statement for yielding a value from a switch expression. See JEP 361: Switch Expressions (Standard) and Java Language Changes.
  • G1 is enhanced to improve allocation performance on non-uniform memory access (NUMA) memory systems. See JEP 345: NUMA-Aware Memory Allocation for G1.
  • JDK Flight Recorder data is now available as a data stream allowing for continuous monitoring. See JEP 349: JFR Event Streaming.
  • New JDK-specific file mapping modes have been added so that the FileChannel API can be used to create MappedByteBuffer instances that refer to non-volatile (NVM) memory. See JEP 352: Non-Volatile Mapped Byte Buffers.
  • Allows currencies to be formatted with locale-specific accounting formats, for example, ($3.27) instead of -$3.27. See Accounting Currency Format Support.
  • Enhanced com.sun.management.OperatingSystemMXBean to ensure that it reports values based on the current operating environment, such as a container environment. The MXBean for tools to get information on the operating system has been improved for container environments. See OperatingSystemMXBean made container aware.

Experimental, Preview, and Incubator Features

Removed APIs, Tools, and Components

See:

In addition, there are security related updates that you need to be aware of. See: Security Updates in JDK 14.