New candidate JEP: 526: Lazy Constants (Second Preview)

Mark Reinhold mark.reinhold at oracle.com
Fri Sep 26 15:48:20 UTC 2025


https://openjdk.org/jeps/526

  Summary: Introduce an API for lazy constants, which are objects that
  hold immutable 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