The newest planned version of Java has now been announced. The next release is version 23 of the Java Development Kit. The release is planned for Sept

Java 23: The New Planned Features Coming Soon

submited by
Style Pass
2024-03-30 06:30:07

The newest planned version of Java has now been announced. The next release is version 23 of the Java Development Kit. The release is planned for September 19th, 2024 and will include preview feature focusing on the integration of primitive types in patterns, instanceof, and switch statements. This is the same feature that is in preview with Java Development Kit 22 that was just released last week.

The introduction of a more refined class-file API marks an evolution from it's preview that was released in JDK 22. The API offer a standardized approach for parsing, generating, and modifying Java class files in alignment with the class file format stipulated by the Java Virtual Machine Specification. One of the pivotal goals is to transition JDK components away from the internal use of the third-party ASM Library towards this standard API. Enhancements in this iteration focus on simplifying the CodeBuilder class, which is instrumental in bytecode generation, by streamlining factory methods for bytecode instructions into low-level factories, mid-level factories, and high-level builders for basic blocks.

Another noteworthy feature earmarked for JDK 23 is the augmentation of pattern matching to incorporate primitive types in instanceof and switch statements. This expansion aims at broadening the utility and applicability of pattern matching by enabling primitive type patterns across all contexts, thereby simplifying type checking and casting while mitigating the risk of information loss.

Leave a Comment