# JEP targeted to JDK 28: 401: Value Objects (Preview)

DevFeed: [JEP targeted to JDK 28: 401: Value Objects (Preview)](<https://devfeed.tech/articles/jep-targeted-to-jdk-28-401-value-objects-preview-55597.md>)

Original publisher: [Read original article](<https://inside.java/2026/09/20/jep401-target-jdk28/>)

Author: Dan Smith

Published: 2026-09-20T00:00:00Z

Content type: article

Language: en

Sources: [Inside Java](<https://devfeed.tech/sources/inside-java.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [JEP-401](<https://devfeed.tech/topics/jep-401.md>), [Project Valhalla](<https://devfeed.tech/topics/project-valhalla.md>), [openjdk](<https://devfeed.tech/topics/openjdk.md>), [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>)

Tags: [jdk-28](<https://devfeed.tech/tags/jdk-28.md>), [jep](<https://devfeed.tech/tags/jep.md>), [preview](<https://devfeed.tech/tags/preview.md>), [project-valhalla](<https://devfeed.tech/tags/project-valhalla.md>), [value-objects](<https://devfeed.tech/tags/value-objects.md>)

## AI overview

JEP 401 proposes preview support in JDK 28 for value objects: instances of explicitly declared `value` classes are immutable and have no identity, so `==` compares their field values. This can let JVMs flatten references in fields and arrays or scalarize them in local variables, potentially reducing memory use and pointer loads; the JVM chooses which optimizations to apply, and no particular layout is guaranteed. Preview features are disabled by default and must be enabled at compile and run time. The proposal covers 30 Platform API value classes, while `String` remains an identity class. Identity-sensitive operations such as synchronization are unsupported for value objects. Migration can affect code relying on distinct instances, locking, serialization, reflection or garbage-collection APIs; non-record value classes implementing `Serializable` need `writeReplace` and `readResolve`. Use `equals` to test whether instances represent the same value, since it may differ from `==`.

## Source excerpt

The following JEP is targeted to JDK 28: 401: Value Objects (Preview)