To run each example use: java --enable-preview --source 15 <FileName.java>
- 339 - Edwards-Curve Digital Signature Algorithm (EdDSA)
- 360 - Sealed Classes (Preview)
- 371 - Hidden Classes
- 372 - Remove the Nashorn JavaScript Engine
- 373 - Reimplement the Legacy DatagramSocket API
- 374 - Disable and Deprecate Biased Locking
- 375 - Pattern Matching for instanceof (Second Preview)
- 377 - ZGC: A Scalable Low-Latency Garbage Collector
- 378 - Text Blocks
- 379 - Shenandoah: A Low-Pause-Time Garbage Collector
- 381 - Remove the Solaris and SPARC Ports
- 383 - Foreign-Memory Access API (Second Incubator)
- 384 - Records (Second Preview)
- 385 - Deprecate RMI Activation for Removal
- Sealed types
- Restrict which types can extend/implement a type
- Constraints:
- The sealed class and its permitted subclasses must belong to the same module, and, if declared in an unnamed module, the same package.
- Every permitted subclass must directly extend the sealed class.
- Every permitted subclass must choose a modifier to describe how it continues the sealing initiated by its superclass:
final
sealed
non-sealed
(back to a normal class open to extensibility)
- Pattern matching for
instanceof
(second preview - no changes) - Text blocks (standard)
- Records (second preview)
- Integration with sealed types in interfaces
- The combination of record and sealed types is referred as algebraic data types.
- Integration with sealed types in interfaces
- GC turned final:
- Shenandoah
- Flag:
-XX:+UseShenandoahGC
- Flag:
- ZGC
- Flag:
-XX:+UseZGC
- Flag:
- Shenandoah