Package net.jrodolfo.java_evolution.java17
package net.jrodolfo.java_evolution.java17
Examples for features introduced in Java 17.
Java 17 is an LTS release. It finalized sealed classes, previewed pattern
matching for switch, introduced the enhanced random generator API and
HexFormat, and strongly encapsulated JDK internals.
For beginner-oriented notes about the problems these features solved, see the package README in the source directory.
-
ClassDescriptionDemonstrates
HexFormat, introduced in Java 17.Demonstrates pattern matching forswitchas a Java 17 preview feature.Demonstrates the enhanced pseudo-random number generator API introduced in Java 17.Demonstrates sealed classes, finalized in Java 17.Final permitted implementation.Final permitted implementation.Sealed parent interface that permits only the listed implementations.Non-sealed implementation, showing that a permitted subtype may reopen the hierarchy.Explains strong encapsulation of JDK internals in Java 17.