News and views from members of the Java team at Oracle
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.
dev.java: the destination for Java developers
OpenJDK: the place to collaborate on the Java Platform and related projects
Oracle Java: the #1 programming language and development platform
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.