Java’s biggest language change in a decade is finally landing. It took 197,000 lines of code.
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
Project Valhalla's JEP 401, introducing value classes and objects to Java, is confirmed for integration into the OpenJDK mainline targeting JDK 28 (March 2027). The change spans 197,000 lines of code across 1,816 files and has been twelve years in the making. Value classes eliminate object identity, meaning objects are distinguished solely by their field values rather than memory location, enabling the JVM to reduce memory overhead and improve cache locality. Some existing JDK classes like Integer will be migrated to value classes. It will ship as a preview feature, not enabled by default. Java Language Architect Brian Goetz warns this is only the first part of Valhalla, with deliberate breaking changes ahead — code that synchronizes on Integer objects will throw exceptions once Integer becomes a value class. Full value semantics requiring nullability and atomicity changes remain future work, and Goetz considers it optimistic to expect the feature to exit preview even by JDK 29.
60.3K Impressions1 Comment