Java Cup
Inside Java

News and views from members of the Java team at Oracle

Episode 37 “Efficient Initialization Using Stable Values” [AtA]

Posted on June 10, 2025

The Stable Values API is a feature available for preview in Java 25 that allows developers to define immutable objects initialized at most once, offering the flexibility of lazy initialization with the performance benefits of final fields.

In this episode, Ana hosted Per Minborg, member of the Java Core Library team at Oracle and co-author of JEP 502 on Stable Values. Per discusses the essence of Stable Values and how this approach addresses the limitations of eager initialization in Java, enabling more efficient application startup by deferring the creation of expensive resources until they are actually needed. He also explains the design process and particularities of the API, emphasizing that Stable Values can be particularly beneficial in multi-threaded environments, ensuring thread-safe, at-most-once initialization without the complexity of traditional synchronization mechanisms.

Show Notes

Additional Resources

In our show "Ask the Architects", we talk to experts in OpenJDK about their work on the Java language, API, and runtime. For Inside Java Podcast episodes, check out the podcast page or our YouTube playlist. For more Java news, subscribe to our RSS feed and follow @Java on X.

Contact us.