JDK 12 (19.3) New Features

  1. "JDK 12 Release Notes", including "What's New in JDK 12" @
  2. OpenJDK's JDK 12 @
  3. "39 New Features (and APIs) in JDK 12" @


JDK 12 was released on March 19, 2019.

JDK 12 New Language Features

JDK 12 introduces one new language feature:

  1. JEP 325: Switch Expression (Preview) (superseded by JEP 354 in JDK 13)

Switch Expression (Preview) (JEP 325)

JDK 12 extends the switch construct so that it can be used as either a statement or an expression, so as to simplify everyday coding.

Take note that this JEP is superseded by JEP 354, which targets JDK 13. See "JDK 13 New Features".

JDK 12 Library Changes

Support for Unicode 11 (core-libs/java.lang)

JDK 12 supports the Unicode 11. It adds 684 new characters (e.g., 66 emoji characters, Copyleft symbol), 7 new scripts (e.g., Hanifi Rohingya, Old Sogdian, Sogdian, Dogra, etc.) and 11 new blocks.

Changes were made to classes java.lang.Character, java.lang.String, java.awt.font.NumericShaper, etc.

JVM Constants API (JEP 334) (core-libs/java.lang.invoke)
Support for Compact Number Formatting (core-libs/java.text)

JDK 12 Other New Features

ZGC Concurrent Class Unloading (hotspot/gc)
Allocation of Old Generation of Java Heap on Alternate Memory Devices (hotspot/gc)
MORE ...