Java Enhances Pattern Matching with Primitive Type Support in JEP 455

February 3, 2024

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.

By A N M Bazlur Rahman  

InfoQ – Java 

Article Categories:
Java

Leave a Reply

Your email address will not be published. Required fields are marked *