# JEP-401

JEP 401 is a Java preview feature introducing value classes and objects, with corresponding JVM specification changes.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## A Valhalla Ticker in One int

DevFeed: [A Valhalla Ticker in One int](<https://devfeed.tech/articles/a-valhalla-ticker-in-one-int-124265.md>)

Original publisher: [Read original article](<https://inside.java/2026/11/09/inside-java-ticker-value-class/>)

Author: Per-Ake Minborg

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

Content type: article

Language: en

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

Topics: [Project Valhalla](<https://devfeed.tech/topics/project-valhalla.md>), [JEP-401](<https://devfeed.tech/topics/jep-401.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [Encoding](<https://devfeed.tech/topics/encoding.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [32-bit](<https://devfeed.tech/tags/32-bit.md>), [abbreviation](<https://devfeed.tech/tags/abbreviation.md>), [account](<https://devfeed.tech/tags/account.md>), [adopting](<https://devfeed.tech/tags/adopting.md>), [alignment](<https://devfeed.tech/tags/alignment.md>), [all](<https://devfeed.tech/tags/all.md>), [allowed](<https://devfeed.tech/tags/allowed.md>), [allows](<https://devfeed.tech/tags/allows.md>), [alphabet](<https://devfeed.tech/tags/alphabet.md>), [also](<https://devfeed.tech/tags/also.md>), [apis](<https://devfeed.tech/tags/apis.md>), [apple](<https://devfeed.tech/tags/apple.md>), [application](<https://devfeed.tech/tags/application.md>), [class](<https://devfeed.tech/tags/class.md>), [implementing](<https://devfeed.tech/tags/implementing.md>), [jdk-28](<https://devfeed.tech/tags/jdk-28.md>), [one](<https://devfeed.tech/tags/one.md>), [performance](<https://devfeed.tech/tags/performance.md>), [project-valhalla](<https://devfeed.tech/tags/project-valhalla.md>), [valhalla](<https://devfeed.tech/tags/valhalla.md>), [value](<https://devfeed.tech/tags/value.md>), [with](<https://devfeed.tech/tags/with.md>)

### AI overview

The example packs one to five uppercase letters, digits, or periods into a 30-bit `int`: six-bit character codes follow string order, with zero padding marking the end. This lets `compareTo` compare integers directly, while `length()` and `charAt()` read characters without decoding a string; `subSequence()` does decode and allocate one. The JDK 28 value-object feature may let HotSpot scalarize individual values or flatten concrete `Ticker[]` arrays, but these are JVM-dependent optimizations. A benchmark on one Apple M4 Pro/OpenJDK 28-internal build found a 1.47x median traversal speedup for a large flat value array versus an identity-class array; it did not measure construction, decoding, or interface calls, and results may vary. The article requires preview flags at compile and run time, notes the five-character limit does not match all exchange rules, and recommends measuring the application's actual workload.

### Source excerpt

Learn how to pack a short ticker symbol into one int with a value class implementing CharSequence and Comparable.

## Episode 73 "Immutable Data Beyond Value Classes" \[AtA\]

DevFeed: [Episode 73 "Immutable Data Beyond Value Classes" \[AtA\]](<https://devfeed.tech/articles/episode-73-immutable-data-beyond-value-classes-ata-106002.md>)

Original publisher: [Read original article](<https://inside.java/2026/10/29/podcast-073/>)

Author: Nicolai Parlog

Published: 2026-10-29T00:00:00Z

Content type: article

Language: en

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

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

Tags: [ata](<https://devfeed.tech/tags/ata.md>), [data](<https://devfeed.tech/tags/data.md>), [features](<https://devfeed.tech/tags/features.md>), [immutable-data](<https://devfeed.tech/tags/immutable-data.md>), [java](<https://devfeed.tech/tags/java.md>), [java-language](<https://devfeed.tech/tags/java-language.md>), [podcast](<https://devfeed.tech/tags/podcast.md>), [project-amber](<https://devfeed.tech/tags/project-amber.md>), [project-valhalla](<https://devfeed.tech/tags/project-valhalla.md>)

### AI overview

The episode examines how Java features help model immutable data with less ceremony. It names flexible constructor bodies, records and value classes, withers, derived record creation, and lazy constants as tools for defining, constructing, copying, and accessing immutable data. The description presents the features as useful individually and in combination; it does not detail their behavior or compare tradeoffs.

### Source excerpt

Recent and upcoming Java features (e.g. value classes, withers, and lazy constants) make it easier to define, construct, copy, and access immutable data

## Quality Outreach Heads-up - JDK 28: Value Classes

DevFeed: [Quality Outreach Heads-up - JDK 28: Value Classes](<https://devfeed.tech/articles/quality-outreach-heads-up-jdk-28-value-classes-101890.md>)

Original publisher: [Read original article](<https://inside.java/2026/10/27/quality-heads-up/>)

Author: Nicolai Parlog

Published: 2026-10-27T00:00:00Z

Content type: article

Language: en

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

Topics: [JEP-401](<https://devfeed.tech/topics/jep-401.md>), [openjdk](<https://devfeed.tech/topics/openjdk.md>), [Project Valhalla](<https://devfeed.tech/topics/project-valhalla.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>)

Tags: [apis](<https://devfeed.tech/tags/apis.md>), [behavior](<https://devfeed.tech/tags/behavior.md>), [boolean](<https://devfeed.tech/tags/boolean.md>), [build](<https://devfeed.tech/tags/build.md>), [builds](<https://devfeed.tech/tags/builds.md>), [classes](<https://devfeed.tech/tags/classes.md>), [code](<https://devfeed.tech/tags/code.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [continuous-integration](<https://devfeed.tech/tags/continuous-integration.md>), [fields](<https://devfeed.tech/tags/fields.md>), [heads-up](<https://devfeed.tech/tags/heads-up.md>), [jdk](<https://devfeed.tech/tags/jdk.md>), [jdk-28](<https://devfeed.tech/tags/jdk-28.md>), [outreach](<https://devfeed.tech/tags/outreach.md>), [project-valhalla](<https://devfeed.tech/tags/project-valhalla.md>), [projects](<https://devfeed.tech/tags/projects.md>), [quality](<https://devfeed.tech/tags/quality.md>), [this](<https://devfeed.tech/tags/this.md>), [value](<https://devfeed.tech/tags/value.md>)

### AI overview

JEP 401 makes value classes a preview feature in JDK 28, so the Quality Outreach update recommends building and testing projects with previews both disabled and enabled when CI permits. With previews enabled at runtime, 30 existing JDK classes--including primitive wrappers, `Optional` types, and date/time classes--become value classes even for code compiled without previews or on earlier JDKs. Their lack of identity can change `==` results; they cannot be used with monitors, `java.lang.ref` APIs, or `WeakHashMap`, and reflective mutation of their fields fails. These changes may require code adaptations; unexpected JDK misbehavior should be reported to `valhalla-dev`. Enabling previews during JDK 28 compilation also applies early-construction rules to record constructors, potentially causing compile errors when constructor code interacts with `this` before assigning fields and calling `super()` or `this(...)`. The excerpt suggests removing or refactoring such code, or moving it after that call.

### Source excerpt

This Heads-Up is part of the regular communication sent to the projects involved; it covers the introduction of value classes and strict fields

## JEP targeted to JDK 28: 539: Strict Field Initialization in the JVM (Preview)

DevFeed: [JEP targeted to JDK 28: 539: Strict Field Initialization in the JVM (Preview)](<https://devfeed.tech/articles/jep-targeted-to-jdk-28-539-strict-field-initialization-in-the-jvm-preview-60302.md>)

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

Author: Dan Smith

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

Content type: article

Language: en

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

Topics: [openjdk](<https://devfeed.tech/topics/openjdk.md>), [JEP-401](<https://devfeed.tech/topics/jep-401.md>), [typesafety](<https://devfeed.tech/topics/typesafety.md>), [Project Valhalla](<https://devfeed.tech/topics/project-valhalla.md>)

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

### AI overview

JEP 539 proposes a preview JVM feature that prevents marked fields from being read before explicit initialization, eliminating observable default values; strictly initialized final fields also cannot change after they become readable. Compilers mark fields with `ACC_STRICT_INIT`, and the JVM enforces static-field rules at run time and instance-field rules through bytecode verification. The feature is disabled by default and requires preview-enabled class files and `--enable-preview`; the JEP does not propose a new Java modifier or changes to `javac` for existing Java code. Strictly initialized final fields cannot be changed through deep reflection, and ordinary object serialization cannot handle classes declaring such instance fields unless replacement methods (`writeReplace`/`readResolve`) are used. JNI can still bypass the guarantees.

### Source excerpt

The following JEP is targeted to JDK 28: 539: Strict Field Initialization in the JVM (Preview)

## 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)

## Value Classes Still Need Compiler Sympathy

DevFeed: [Value Classes Still Need Compiler Sympathy](<https://devfeed.tech/articles/value-classes-still-need-compiler-sympathy-15126.md>)

Original publisher: [Read original article](<https://inside.java/2026/08/24/value-classes-compiler-sympathy/>)

Author: Johan Sjölén

Published: 2026-08-24T00: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>), [Project Valhalla](<https://devfeed.tech/topics/project-valhalla.md>), [JEP-401](<https://devfeed.tech/topics/jep-401.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [inlining](<https://devfeed.tech/topics/inlining.md>), [code analysis](<https://devfeed.tech/topics/code-analysis.md>)

Tags: [abi](<https://devfeed.tech/tags/abi.md>), [abstraction](<https://devfeed.tech/tags/abstraction.md>), [adapter](<https://devfeed.tech/tags/adapter.md>), [analysis](<https://devfeed.tech/tags/analysis.md>), [annotation](<https://devfeed.tech/tags/annotation.md>), [apply](<https://devfeed.tech/tags/apply.md>), [argument](<https://devfeed.tech/tags/argument.md>), [c2](<https://devfeed.tech/tags/c2.md>), [class](<https://devfeed.tech/tags/class.md>), [classes](<https://devfeed.tech/tags/classes.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [identity](<https://devfeed.tech/tags/identity.md>), [jep-401](<https://devfeed.tech/tags/jep-401.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [openjdk](<https://devfeed.tech/tags/openjdk.md>), [optimize](<https://devfeed.tech/tags/optimize.md>), [profiling](<https://devfeed.tech/tags/profiling.md>), [project-valhalla](<https://devfeed.tech/tags/project-valhalla.md>), [semantic](<https://devfeed.tech/tags/semantic.md>), [state](<https://devfeed.tech/tags/state.md>), [valhalla](<https://devfeed.tech/tags/valhalla.md>), [value](<https://devfeed.tech/tags/value.md>), [values](<https://devfeed.tech/tags/values.md>)

### AI overview

JDK 28's preview value classes can enable flattening and scalarization, but they do not guarantee faster code. The source shows that immutable final fields can hold large values in flattened form, while mutable fields may use references to preserve tear-free assignment. C2 can eliminate allocations in a value transformation loop; the comparable identity-record example retained allocations. A further allocation source is generic type erasure: a megamorphic call through an inherited `Object apply(Object)` descriptor forces scalarized values to be materialized as heap references. Explicitly redeclaring the typed method in the interface (`Carrier apply(LargeValue)`) lets values cross that dynamic call boundary scalarized; in the reported reproducer, allocation fell from 192 bytes per invocation to zero. The author recommends profiling and inspecting generated code because compiler optimizations depend on context.

### Source excerpt

Declaring a value class is first and foremost a semantic decision. It tells our fellow programmers that its instances are defined entirely by their state and do not need identity. That clearer model is valuable in itself! The JVM's additional freedom to optimize how those values are represented is a welcome bonus. C2 can do amazing things with that freedom, but it cannot always recover information hidden behind abstraction boundaries. Profiling and inspecting the generated code remain the best ways to understand what is happening. To get the best results, we may still need to have a little sympathy for the compiler.

## Project Valhalla Uses Java Value Classes to Reduce Domain-Primitive Overhead

DevFeed: [Project Valhalla Uses Java Value Classes to Reduce Domain-Primitive Overhead](<https://devfeed.tech/articles/rethink-domain-primitives-with-valhalla-41529.md>)

Original publisher: [Read original article](<https://dfa1.github.io/articles/rethink-domain-primitives-with-valhalla.html>)

Author: Davide Angelocola

Published: 2026-05-16T00:00:00Z

Content type: opinion

Language: en

Sources: [Davide Angelocola](<https://devfeed.tech/sources/davide-angelocola.md>)

Topics: [Project Valhalla](<https://devfeed.tech/topics/project-valhalla.md>), [JEP-401](<https://devfeed.tech/topics/jep-401.md>), [Scala](<https://devfeed.tech/topics/scala.md>), [Java](<https://devfeed.tech/topics/java.md>), [software-architecture](<https://devfeed.tech/topics/software-architecture.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [heap](<https://devfeed.tech/tags/heap.md>), [java](<https://devfeed.tech/tags/java.md>), [jep-401](<https://devfeed.tech/tags/jep-401.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [memory](<https://devfeed.tech/tags/memory.md>), [performance](<https://devfeed.tech/tags/performance.md>), [project-valhalla](<https://devfeed.tech/tags/project-valhalla.md>), [scala](<https://devfeed.tech/tags/scala.md>), [valhalla](<https://devfeed.tech/tags/valhalla.md>)

### AI overview

The article examines how Project Valhalla value classes can make domain-specific types more practical in performance-sensitive Java code. It focuses on flattening wrappers into arrays, registers, and object fields to reduce heap allocation, indirection, memory use, cache misses, and garbage-collection overhead.

### Source excerpt

Your Compiler Is Already Part of Your Security Team made the case for domain primitives: encode constraints in types, the compiler enforces them forever. The recurring objection -- a wrapper class per int is one heap object per value, plus a pointer to reach it. Fine at the boundary; questionable in a hot loop where allocations and cache misses dominate.

## Introducing Stripe's new public preview release channel

DevFeed: [Introducing Stripe's new public preview release channel](<https://devfeed.tech/articles/introducing-stripe-s-new-public-preview-release-channel-81789.md>)

Original publisher: [Read original article](<https://stripe.dev/blog/introducing-stripes-new-public-preview-release-channel>)

Author: Paul Anderson

Published: 2025-05-07T00:00:00Z

Content type: release

Language: en

Sources: [Stripe Dot Dev Blog](<https://devfeed.tech/sources/stripe-dot-dev-blog.md>)

Topics: [Beta channel](<https://devfeed.tech/topics/beta-channel.md>), [JEP-401](<https://devfeed.tech/topics/jep-401.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [channel](<https://devfeed.tech/tags/channel.md>), [preview](<https://devfeed.tech/tags/preview.md>), [release](<https://devfeed.tech/tags/release.md>)

### AI overview

Stripe introduces a public preview release channel that gives users early access to API features before general availability and lets them share feedback.

### Source excerpt

Discover the benefits of Stripe's new public preview release channel, designed to provide early access to cutting-edge API features before their general availability. Start innovating faster with Stripe's latest offerings while sharing your feedback to shape future developments!