Two Java versions are in consideration are the version 25 (LTS) and 27(latest).
What was shipped in Java 25
Java 25 carries Oracle's strongest commitment on the table. Premier support runs through September 2030, and extended support runs to September 2033. That alone outlasts most of what you'll build while you're still deepening your Java.
Compact source files and instance main methods
A first Java program used to require a class declaration and a public static main method with a String array parameter, all before a single useful line. A compact source file drops the explicit class and lets void main() stand on its own. The method no longer has to be static, and the String array parameter is optional. Java 25 also adds a small java.lang.IO class for console input and output, and compact source files automatically import the public API of the java.base module. The language underneath is unchanged, so a compact file can grow into an ordinary class without a rewrite. For experienced developers, the practical gain is scripts and quick experiments that no longer need ceremony.
Scoped Values
ThreadLocal has three well-known problems. Any code with access can change the value, the value lives until someone remembers to clear it, and copying values into child threads gets expensive at scale. A scoped value is bound for the duration of a single call. Code inside that call can read it, nothing can reassign it, and the binding disappears automatically when the call returns. Because the binding is immutable and bounded, child threads can share it instead of copying it, which is what makes the model workable with virtual threads, where you may have millions of them. Typical uses are request context, user identity, and transaction IDs travelling down a call chain.
Flexible constructor bodies
A call to super() or this() used to have to be the first statement in a constructor, which pushed argument validation into static helper methods or awkward inline expressions. Constructors can now run statements before that call. They can validate input, compute arguments, and assign fields declared by the class, but they cannot read the instance under construction. Bad input is caught before the superclass constructor runs. The change also closes an old trap: a superclass constructor calling an overridable method that sees subclass fields still sitting at their default values.
Module import declarations
A single import module statement makes every public top-level type in the packages a module exports available on demand, including those from modules it exports transitively. It helps most in teaching code, scripts, and prototypes, and your own code does not need to be modular to use it. One caveat is that if two imported packages declare the same simple name, the compiler reports an ambiguity, and you resolve it with an ordinary single-type import.
The Key Derivation Function API
Key derivation is the step that turns one secret into one or more cryptographic keys, and it runs underneath TLS and many other protocols. Java had no standard public API for it, which pushed teams toward provider-specific code or hand-rolled implementations. javax.crypto.KDF provides a standard, provider-based entry point with HKDF (RFC 5869) supported, and room for other algorithms later. Hybrid post-quantum schemes lean heavily on key derivation, so this API is also groundwork for what Java 27 ships on the TLS side.
Ahead-of-time caching under Project Leyden
Two changes landed together. The first simplified cache creation to a single flag that records a training run and builds the cache in one step. The second stores method execution profiles inside the cache, so the JIT compiler can compile hot methods almost immediately instead of waiting to observe them. The payoff is startup time for anything short-lived or frequently scaled out, such as CLI tools, containers, and serverless functions.
None of this is provisional. It's the current, finished shape of the language, and it's the version nearly every production codebase and job listing that names a version actually means.
What's finished in Java 27, and what isn't
Java 27 shipped on September 15, 2026, and what's in it is real. It's just unevenly finished, and its own support closes in March 2027, about six months out.
G1 everywhere
Historically the JVM judged whether it was on a server-class machine, and on a single CPU or with little memory it quietly chose the Serial collector instead of G1. Container limits made that common. The same application could behave differently in a small container than in a larger environment, and tuning advice did not transfer between them. G1 is now the default regardless of size, so collector behavior and tuning knobs stay consistent from laptop to production. Teams that want Serial in tiny containers can still select it explicitly.
Compact object headers, on by default
Every Java object carries a header holding bookkeeping such as its class reference, identity hash, and lock state. Compact headers pack that into 64 bits. Smaller objects mean less heap use, less garbage collection pressure, and better data density, with the biggest effect in programs that allocate many small objects. This was opt-in before. Now the benefit arrives without any tuning.
Post-quantum hybrid key exchange for TLS 1.3
The threat it addresses is traffic captured today and decrypted years from now once quantum computers can break current key exchange. Java now runs a classical exchange alongside ML-KEM-768, a quantum-resistant one, and derives the session key from both, so an attacker would have to break both. It is on by default and negotiated like any other TLS key exchange group. There is nothing to change in application code, but anyone responsible for TLS configuration should know it exists.
JFR in-process data redaction
Flight Recorder events can capture environment variables, system properties, and startup flags, which often hold database passwords and API keys. Recordings routinely get attached to tickets and shared with vendors. Redaction now happens in memory before anything is written, so secrets never reach disk in the first place.
The other five features are still preview or incubator status. Each needs an explicit enable-preview switch at compile and run time, and none is guaranteed to survive to a final release unchanged.
Structured Concurrency, seventh preview : It treats a group of related subtasks running on separate threads as one unit of work. If one fails, its siblings are cancelled, errors propagate to the owner, and the scope cannot end until every subtask has finished. The API surface around joining and failure policy has been reworked across previews, which is why it is still not final.
Primitive Types in Patterns, fifth preview : It extends pattern matching to primitive types, so switch and instanceof can work with int, long, and the rest. The conversion rules have to be safe and lossless, and getting those rules right is what keeps extending the preview.
Vector API, twelfth incubator round : It expresses SIMD-style numeric computation portably, so the JIT compiler can turn it into hardware vector instructions. Its long incubation is widely understood to be tied to Project Valhalla, which the API is waiting on.
Lazy Constants, third preview : These are immutable values initialized on first use instead of at class load, and the JVM can treat them as constants once set. They let you defer expensive initialization without double-checked locking. The feature began as Stable Values in Java 25.
PEM Encodings, third preview : It is a standard API for encoding and decoding keys, certificates, and revocation lists to and from PEM text. That job is currently done with hand-rolled Base64 handling or third-party libraries.
That track record is the signal. It's exactly why none of these are ready to be what you build on.
Verdict
Build on Java 25. Take your projects, your roadmap, and your production work seriously on it. Skipping 27 isn't falling behind, it's matching the version to the actual commitment behind it. Skim the Java 27 release notes once so the terms are familiar, and revisit this when Java 29 ships as the next LTS in September 2027.
If you're ready to put this into motion, the Java Learning Roadmap is built on exactly this foundation. Java 25, in the order that gets you to real, production-level fluency.
