Virtual Threads (Second Preview)
Virtual threads are previewed again, with a small set of changes from the first preview.
First preview in Java 19 (JEP 425). Final in Java 21 (JEP 444).
OpenJDK JEP 436 (leaves JavaForge)
Related reading: Concurrency
JDK 20 · JSR 395
JDK 20 is Java SE 20, JSR 395, generally available on 21 March 2023. Scoped values appear for the first time, as an incubator API. Virtual threads, record patterns, switch patterns, and the foreign function and memory API are further previews. Structured concurrency is a second incubator.
Virtual threads are previewed again, with a small set of changes from the first preview.
First preview in Java 19 (JEP 425). Final in Java 21 (JEP 444).
OpenJDK JEP 436 (leaves JavaForge)
Related reading: Concurrency
Record patterns are previewed again.
Final in Java 21 (JEP 440).
OpenJDK JEP 432 (leaves JavaForge)
Related reading: Records and sealed classes
Pattern matching for switch is previewed a fourth time.
Final in Java 21 (JEP 441).
OpenJDK JEP 433 (leaves JavaForge)
Related reading: Control flow
An incubator API shares immutable data with a call and with child threads. It is not a preview and not a standard API.
Preview in Java 21 through Java 24. Final in Java 25 (JEP 506).
OpenJDK JEP 429 (leaves JavaForge)
Related reading: Concurrency
Structured concurrency incubates a second time. It is still not a preview.
First incubator in Java 19 (JEP 428). First preview in Java 21 (JEP 453).
OpenJDK JEP 437 (leaves JavaForge)
Related reading: Concurrency
The foreign function and memory API is previewed a second time.
Final in Java 22 (JEP 454).
The Vector API incubates a fifth time.
Still incubating in Java 25.
Scoped values are an incubator API in this release. There is no Java 20 sample. The incubator type lived in a module that JDK 25 does not ship, so the final Java 25 example is not a Java 20 program.
Sources. General availability, JSR 395, and the JEP list: OpenJDK JDK 20. OpenJDK JDK 20 (leaves JavaForge)