1/10
5 New
Java 25 (LTS)
Features
Med Ezzitouni Swipe left
Software Engineer
2/10
Features
main Method and class-less Files
Primitive Types in Patterns
Structured Concurrency
ScopedValues & StableValue API
Cryptographic keys and Certificates
Med Ezzitouni
Software Engineer Swipe left
[Link]
3/10
main() & class-less files
It allows us to write quick scripts or demos
without class declarations
it removes boilerplate and makes Java a better
language for quick scripts, similar to Python or
[Link].
Med Ezzitouni
Software Engineer Swipe left
[Link]
4/10
Primitive Types in Patterns
Pattern matching can handle primitive types in
switch and instanceof statements
reduces the need for explicit casting and makes
code safer and more readable.
Med Ezzitouni
Software Engineer Swipe left
[Link]
5/10
Structured Concurrency
→ Manage the lifecycle of parallel tasks,
→ Guarantee that all tasks complete or fail.
together without needing complex manual
synchronization.
Traditional concurrency models in Java, such as "fire-and-forget",
can lead to chaos. It's difficult to manage the lifecycle of threads,
and complex logic is required to handle errors and cancellations.
Med Ezzitouni
Software Engineer Swipe left
[Link]
6/10
ScopedValues
lightweight, immutable, thread-safe
alternative to ThreadLocal.
ThreadLocal can suffer from memory leaks and is not
compatible with modern virtual threads
Med Ezzitouni
Software Engineer Swipe left
[Link]
7/10
StableValues
→ Ensure a value is computed only once.
→ Guarantee a stable, single instance for
a given context.
The StableValue API solves the problem of re-computation.
ensuring a stable, single instance is available for a given
context. This can improve startup performance.
Med Ezzitouni
Software Engineer Swipe left
[Link]
8/10
Cryptographic keys & Certificates
This provides a simple, standard way to
decode PEM-encoded keys and certificates,
reducing reliance on complex third-party
libraries.
Med Ezzitouni
Software Engineer Swipe left
[Link]
9/10
Other Changes
JEP 482: Flexible Constructor Bodies
JEP 476: Module Import Declarations
JEP 510: Key Derivation Function API
JEP 509: JFR CPU-Time Profiling
JEP 514: Ahead-of-Time Command-
Line Ergonomics
JEP 508: Vector API
Etc …
Med Ezzitouni
Software Engineer Swipe left
[Link]
I share these insights so we
can all grow together.
let's keep that growth going by sharing it
with a fellow dev who needs to see it.