New candidate JEP: 531: Lazy Constants (Third Preview)
Mark Reinhold
mark.reinhold at oracle.com
Wed Feb 25 14:03:12 UTC 2026
https://openjdk.org/jeps/531
Summary: Introduce an API for lazy constants, which are objects that
hold unmodifiable data. Lazy constants are treated as true constants
by the JVM, enabling the same performance optimizations that are
enabled by declaring a field final. Compared to final fields, however,
lazy constants offer greater flexibility as to the timing of their
initialization. This is a preview API.
- Mark
More information about the core-libs-dev
mailing list