Class PatternMatchingSwitchFourthPreviewExamples
java.lang.Object
net.jrodolfo.java_evolution.java20.PatternMatchingSwitchFourthPreviewExamples
Demonstrates pattern matching for switch as refined in the Java 20 fourth
preview.
Pattern matching for switch went through multiple preview rounds
because it needed careful rules for null handling, guarded patterns,
exhaustiveness, and interaction with sealed types. Java 20 continued that
refinement before the feature became final in Java 21.
This class uses final JDK 25 syntax while documenting the Java 20 preview origin.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PatternMatchingSwitchFourthPreviewExamples
public PatternMatchingSwitchFourthPreviewExamples()
-
-
Method Details
-
classify
-