The following describes selected improvements of the Java language. See the Java 24 release notes. See Java Language Updates for Java SE 24.
Java 24 is introducing the following language enhancements as developer preview.
JEP 488 is continuing with Primitive Types in Patterns, instanceof, and switch (Second Preview). Enhance pattern matching by allowing primitive type patterns in all pattern contexts, and extend instanceof and switch to work with all primitive types.
JEP 492 is continuing with Flexible Constructor Bodies (Third Preview). In constructors in the Java programming language, allow statements that do not reference the instance being created to appear before an explicit constructor invocation.
JEP 494 is continuing with Module Import Declarations (Second Preview). Enhance the Java programming language with the ability to succinctly import all of the packages exported by a module. This simplifies the reuse of modular libraries, but does not require the importing code to be in a module itself.
JEP 495 is continuing with Simple Source Files and Instance Main Methods (Fourth Preview). Enhance the Java programming language so that students can write their first programs without needing to understand language features designed for large programs.