JDK 15 · JSR 390

Java 15

JDK 15 is Java SE 15, JSR 390, generally available on 15 September 2020. Text blocks become permanent. Sealed classes are a preview, and records and instanceof patterns are in a second preview. ZGC and Shenandoah leave experimental status.

How to read the status

Language

Pattern Matching for instanceof (Second Preview)

JEP 375 · Preview · Language

instanceof patterns are previewed again, without becoming final.

First preview in Java 14 (JEP 305). Final in Java 16 (JEP 394).

OpenJDK JEP 375 (leaves JavaMastery)

APIs / Libraries

Edwards-Curve Digital Signature Algorithm (EdDSA)

JEP 339 · Final · APIs / Libraries

The JDK implements EdDSA signatures, a cryptographic API addition.

OpenJDK JEP 339 (leaves JavaMastery)

JVM / Runtime

Shenandoah: A Low-Pause-Time Garbage Collector

JEP 379 · Final · JVM / Runtime

Shenandoah becomes a product feature. It is not the default collector.

Experimental in Java 12 (JEP 189).

OpenJDK JEP 379 (leaves JavaMastery)

Related reading: JVM and memory

Tools / Platform

Remove the Nashorn JavaScript Engine

JEP 372 · Final · Tools / Platform

Nashorn is removed.

It shipped in Java 8 and was deprecated in Java 11 (JEP 335).

OpenJDK JEP 372 (leaves JavaMastery)

Examples

  • versions5Java17Features.javaCumulative Java 12–17 example · Requires Java 17Final forms only: switch expressions from Java 14, text blocks from Java 15, records and instanceof patterns from Java 16, and sealed classes from Java 17. This is not a Java 12 preview program. Pattern matching for switch was still a preview in Java 17 and is not used.

Related reading

Historical notes

Hidden classes (JEP 371) also ship. They are a JVM feature for frameworks that generate classes, not a new source construct for typical programs.

Sources. General availability and the JEP list: OpenJDK JDK 15. JSR 390: Oracle Java SE specifications. OpenJDK JDK 15 (leaves JavaMastery)

All versions