Primitive Types in Patterns, instanceof, and switch (Second Preview)
Primitive patterns are previewed a second time.
Third preview in Java 25 (JEP 507). Not final.
JDK 24 · JSR 399
JDK 24 is Java SE 24, JSR 399, generally available on 18 March 2025. Stream gatherers and the class-file API become permanent. The Security Manager is permanently disabled. Scoped values, structured concurrency, primitive patterns, module imports, and flexible constructor bodies are still previews. Generational Shenandoah and compact object headers are experimental.
Primitive patterns are previewed a second time.
Third preview in Java 25 (JEP 507). Not final.
Statements before super(...) are previewed a third time.
Final in Java 25 (JEP 513).
import module is previewed a second time.
Final in Java 25 (JEP 511).
The compact-program preview continues under the name simple source files.
Final in Java 25 as compact source files (JEP 512).
Gatherers are a permanent intermediate stream operation. Gatherers.windowFixed is one of the built-in gatherers.
Preview in Java 22 (JEP 461) and Java 23 (JEP 473).
OpenJDK JEP 485 (leaves JavaMastery)
Related reading: Streams and Optional
Curriculum file: versions8Java24Gatherers.java
The class-file API is a standard way to parse, generate, and transform class files.
Preview in Java 22 (JEP 457) and Java 23 (JEP 466).
The Security Manager cannot be enabled. The API remains deprecated for removal.
Deprecated for removal in Java 17 (JEP 411).
The JDK implements ML-KEM, a module-lattice key encapsulation mechanism.
The JDK implements ML-DSA, a module-lattice signature algorithm.
A preview API derives keys from key material. It is not final.
Final in Java 25 (JEP 510).
Scoped values are previewed a fourth time.
Final in Java 25 (JEP 506).
OpenJDK JEP 487 (leaves JavaMastery)
Related reading: Concurrency
Structured concurrency is previewed a fourth time.
Fifth preview in Java 25 (JEP 505). It is not final.
OpenJDK JEP 499 (leaves JavaMastery)
Related reading: Concurrency
The Vector API incubates a ninth time.
Tenth incubator in Java 25 (JEP 508).
A virtual thread that enters a synchronized method or block can unmount from its carrier. This removes a reason virtual threads stayed pinned.
Virtual threads themselves were finalized in Java 21 (JEP 444).
OpenJDK JEP 491 (leaves JavaMastery)
Related reading: Concurrency
ZGC’s non-generational mode is removed. Generational ZGC remains.
Generational mode became the default in Java 23 (JEP 474).
OpenJDK JEP 490 (leaves JavaMastery)
Related reading: JVM and memory
An application can load and link classes from a cache created in a training run, so startup does less of that work.
Java 25 simplifies the command line for creating that cache (JEP 514).
Shenandoah’s generational mode is experimental. The default Shenandoah mode stays single-generation.
It becomes a product feature in Java 25 (JEP 521) and is still not the default mode.
OpenJDK JEP 404 (leaves JavaMastery)
Related reading: JVM and memory
Compact object headers are an experimental layout. They are not the default.
They become a product feature in Java 25 (JEP 519) and are still not the default layout.
Also in this release: removal of the Windows 32-bit x86 port (JEP 479), warnings on Unsafe memory access (JEP 498), and deprecation of the 32-bit x86 port for removal (JEP 501).
Features that are still previews here stay previews on this page even when Java 25 finalizes them. Generational Shenandoah is experimental in this release, not a product feature yet.
Sources. General availability, JSR 399, and the JEP list: OpenJDK JDK 24. OpenJDK JDK 24 (leaves JavaMastery)