Package net.jrodolfo.java_evolution.java19
package net.jrodolfo.java_evolution.java19
Examples for features introduced or previewed in Java 19.
Java 19 previewed and incubated several features that shaped modern Java. Virtual threads targeted scalable blocking code, record patterns and pattern matching for switch reduced type-dispatch boilerplate, structured concurrency improved task lifetime management, and the Foreign Function and Memory API continued the path away from JNI for many native-integration use cases.
-
ClassDescriptionExplains the Foreign Function and Memory API as a Java 19 preview feature.Demonstrates the continued preview of pattern matching for switch in Java 19.Closed event hierarchy used to demonstrate exhaustive switch handling.Event representing a user login.Event representing a user logout.Demonstrates record patterns as a Java 19 preview feature.Small record used by the record pattern example.Demonstrates virtual threads as a Java 19 preview feature.