InfoQ Homepage Pattern matching Content on InfoQ
News
RSS Feed-
Java Enhances Pattern Matching with Primitive Type Support in JEP 455
JEP 455, Primitive Types in Patterns, instanceof, and switch (Preview), has been promoted from Proposed to Target to Targeted for JDK 23. This JEP, under the auspices of Project Amber, proposes to enhance pattern matching by allowing primitive type patterns in all pattern contexts, and extend instanceof and switch to work with all primitive types.