JDK 17 is Java SE 17, JSR 392, generally available on 14 September 2021. Vendors treat it as a long-term support release. Sealed classes become permanent. Pattern matching for switch is only a preview. The JDK strongly encapsulates its internals.
How to read the status
Final. The change shipped in this release as a permanent part of that release.
Preview. It can be tried with --enable-preview. A preview is not a permanent language or API guarantee.
Incubator. An incubator API is not a supported standard API. It can change or be removed.
Language
Sealed Classes
JEP 409 · Final · Language
A sealed type permits a fixed set of subtypes, which a switch can cover exhaustively once pattern matching for switch is available.
Preview in Java 15 (JEP 360) and Java 16 (JEP 397).
Also in this release: context-specific deserialization filters (JEP 415), removal of RMI Activation (JEP 407), and a macOS/AArch64 port (JEP 391).
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.
Since Java 11, switch expressions became final in Java 14, text blocks in Java 15, and records and instanceof patterns in Java 16. Sealed classes become final here. Pattern matching for switch is still a preview, so the Java 17 example does not use it.