Skip to content

Java 25 has arrived: lean programming, enduring values, and extended support span

OpenJDK approves multiple JDK Enhancement Proposals, encompassing proposals for immutable values, adaptable constructors, and compact Java files.

Java 25 is now available: Offers streamlined programming, consistent values, and prolonged support
Java 25 is now available: Offers streamlined programming, consistent values, and prolonged support

Java 25 has arrived: lean programming, enduring values, and extended support span

Java 25, the latest Long-Term Support (LTS) release, has been unveiled by Oracle, marking a significant update to the popular programming language. This version, coinciding with the current year, brings a host of new features and enhancements aimed at improving performance, reducing boilerplate code, and enhancing thread safety.

One of the key new features in Java 25 is the introduction of immutable Stable Values. These values can be initialized only once and are read-only, providing a more secure and efficient way to handle data. Stable Values are accompanied by Scoped Values, which offer thread-safe access to values and represent global states, having been finalized in this release.

Another notable addition is the Vector API, now in its tenth round as an incubator. This API aims to capitalize on current CPU architectures and instructions like Single Instruction Multiple Data (SIMD) and vector processors for vector computation, promising improved performance for complex mathematical operations.

The release also focuses on reducing boilerplate code. Module Import Declarations in Java 25 make all exported packages of a module available with one declaration, cutting down on unnecessary lines of code. Additionally, the Compact Source Files & Instance-main JEP enables slimmer programs and reduces boilerplate code further.

Flexible Constructor Bodies in Java 25 allow limited instructions before the call to perform actions like validations, offering more flexibility in the construction of objects.

Two-thirds of the JEPs in Java 25 are marked as final, signifying that they are complete and ready for production use. A detailed overview of all 18 JDK Enhancement Proposals (JEPs) can be found on the Developer site of the website.

Regular Java releases only receive six months of support, but Java 25, due to its LTS status, will receive commercial support from Oracle until at least September 2033. The complete overview of the new features in JDK 25 can be found in the Release Notes for JDK 25.

While many of the new features in Java 25 have received attention, there are some less-known aspects, such as the improvements to start-up times with Stable Values, detailed in the blog post 'The key new features of Java 25: Faster startup with Stable Values.' For a more comprehensive look at the less-known new features, check out the blog post 'The less-known new features of Java 25.'

Java 25 replaces its predecessor and will be followed by Java 27 in the spring of 2026, as the OpenJDK project releases a new version every six months.

Oracle, as the primary steward of Java, officially released and likely offers commercial support for Java 25. For those seeking a deeper understanding of the new features, two detailed blog posts provide an overview of all 18 JEPs in JDK 25. The journey of Java continues with Java 25, promising improved efficiency, security, and flexibility for developers worldwide.

Read also:

Latest