Java 23, released on September 17, 2024, adds language and library previews, runtime changes, and a finalized documentation improvement. Its headline items are primitive-aware pattern matching and generational ZGC becoming the default mode. But Java 23 is a feature release, not a declaration that every listed change is finished: its 12 JEPs include eight previews and one incubator feature. Treat previews and incubator APIs as experiments, and check annotation-processing configuration before upgrading.
What’s new in Java 23?
JDK 23 is the reference implementation of Java SE 23 under JSR 398. OpenJDK lists 12 JEPs in the release; Oracle’s 2024 product blog counts eight preview features and one incubator feature among them. Those figures describe the status of the JEP set, not twelve finalized additions. The changes span language design, libraries, concurrency, runtime behavior, and developer tools. OpenJDK’s JDK 23 project page and Oracle’s release blog provide the release overview.
A preview is available for evaluation but may change in a later release; an incubator API is likewise not a finalized standard API. Of the changes below, Markdown documentation comments are finalized. Most of the new language and library capabilities remain previews, while the Vector API is in its eighth incubator iteration.
Which Java 23 language features matter?
Primitive types in patterns, instanceof, and switch
JEP 455 is a preview that extends pattern matching to primitive types and allows instanceof and switch to work with all primitive types. This can make code that handles primitive and object values more uniform. Because it is a preview, developers should evaluate it with preview features enabled in their toolchain and avoid treating its syntax or behavior as a permanent language promise. JEP 455 describes the proposal.
Module Import Declarations
JEP 476 introduces a preview declaration that imports the packages exported by a module in one step. The importing code does not itself need to belong to a module. This may reduce import boilerplate when using modular libraries or creating small examples, but it remains subject to preview evolution. See JEP 476.
Flexible Constructor Bodies
JEP 482 is a second preview of flexible constructor bodies. It permits statements before an explicit super(...) or this(...) call, with a key restriction: those statements cannot refer to the instance being constructed. The design can help prepare superclass arguments or safely initialize fields before a superclass constructor dispatches to overridden methods. See JEP 482.
Implicitly Declared Classes and Instance Main Methods
JEP 477 is a third preview of a simpler way to write small, single-class programs with fewer declarations. It is intended to make entry-level Java programs more approachable while leaving a path toward the broader language. It is still a preview in JDK 23, rather than a replacement for the established class-and-main-method structure. See JEP 477.
Rank #2
What library and concurrency capabilities are previewed?
Class-File API
JEP 466, a second preview, provides a standard API for parsing, generating, and transforming class files. Framework authors and bytecode-tool developers are the most likely to investigate it. Its preview status is especially relevant for tools that need a stable long-term API contract. See JEP 466.
Stream Gatherers
JEP 473, a second preview, adds custom intermediate operations to stream pipelines. It is aimed at transformations that are awkward to express with the built-in intermediate operations. Teams considering it should account for the fact that the API is still preview. See JEP 473.
Structured Concurrency
JEP 480 is a third preview of structured concurrency, which treats related tasks running in multiple threads as one unit of work. Its goals include making cancellation, error handling, reliability, and observability easier to reason about. It is an evolving API, not a finalized concurrency contract. See JEP 480.
Scoped Values
JEP 481, in its third preview, offers a way to share immutable data with callees in a thread and with child threads. Oracle describes scoped values as an alternative to thread-local variables, particularly relevant alongside virtual threads and structured concurrency. See JEP 481.
Vector API
JEP 469 is the Vector API’s eighth incubator iteration. It expresses vector computations that can compile at runtime to supported CPU vector instructions. The API remains incubating, so do not treat it as a final standard API or assume that every processor supports the same vector capabilities. See JEP 469.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
What changes at runtime and in developer tools?
Generational ZGC becomes the default
JEP 474 makes ZGC’s generational mode the default and deprecates non-generational ZGC for removal. Oracle says this will generally improve application performance, but also notes that some workloads using the non-generational mode may be negatively affected. There is no quantified gain established for Java applications as a whole: benchmark the application and workload you actually run before drawing a performance conclusion. See JEP 474.
Rank #4
Graal JIT is an opt-in option in Oracle JDK 23
Oracle JDK 23 includes Graal JIT among its available JIT compilers. To activate it, use -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT. Without those options, Oracle JDK uses its default C2 JIT. This availability and command apply to Oracle JDK; it is not a default compiler switch for every JDK vendor. See Oracle’s Java 23 VM performance documentation.
Markdown in JavaDoc comments
JEP 467 is a finalized tooling enhancement: JavaDoc comments can use Markdown alongside HTML and JavaDoc tags. It gives documentation authors another way to format API comments without making this change a preview API. See JEP 467.
What should developers check before migrating to JDK 23?
Configure annotation processing explicitly
JDK 23 disables annotation processing by default when the compiler invocation does not explicitly configure it. If your build relies on processors being discovered and run implicitly, update the compiler configuration. Oracle documents -proc:full as a way to preserve the older behavior and notes support in the Maven Compiler Plugin. Check the build’s effective compiler arguments rather than assuming an IDE or build tool will infer the setting. See Oracle’s JDK 23 migration guide.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Best Value
Review memory access through sun.misc.Unsafe
JDK 23 deprecates the memory-access methods in sun.misc.Unsafe for removal; it does not remove them immediately. Library maintainers should identify dependencies on those methods and evaluate supported alternatives, including VarHandle and the Foreign Function & Memory API. See Oracle’s migration guidance.
Do not expect String Templates in this release
String Templates were previewed in JDK 21 and re-previewed in JDK 22, but were withdrawn after feedback and discussion. They are not part of JDK 23. Code or plans based on those earlier previews should not assume the feature remains available. See Oracle’s JDK 23 migration guide.
Separate source, binary, and behavioral compatibility
Oracle’s release notes distinguish source, binary, and behavioral compatibility. For an upgrade review, treat these as separate checks: whether code compiles, whether existing binaries link, and whether the application’s runtime behavior changes. See the Java 23 documentation index, which links to the release notes and migration guide.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Which Java 23 features are worth trying first?
| Change | Status in JDK 23 | Best fit | Adoption consideration |
|---|---|---|---|
Primitive patterns, instanceof, and switch |
Preview | Teams simplifying code that branches across primitive values and patterns | Preview feature; syntax and behavior may change. |
| Module Import Declarations | Preview | Modular-library users and concise examples | Preview feature; importing code need not itself be modular. |
| Flexible Constructor Bodies | Second preview | Constructors that need safe setup before invoking another constructor | Statements before super or this cannot reference the instance under construction. |
| Implicitly Declared Classes and Instance Main Methods | Third preview | Small entry-level programs | Still a preview in JDK 23. |
| Class-File API | Second preview | Frameworks and bytecode tooling | Preview API; assess stability needs before depending on it. |
| Stream Gatherers | Second preview | Custom intermediate stream transformations | Preview API. |
| Structured Concurrency and Scoped Values | Third preview each | Related concurrent tasks and immutable context sharing | Both are evolving preview APIs. |
| Vector API | Eighth incubator | Vector computations that can use supported CPU instructions | Incubator API, not a final standard API. |
| Generational ZGC default | Runtime change | Applications using ZGC | Benchmark the target workload; some non-generational workloads may be negatively affected. |
| Markdown documentation comments | Finalized | Teams maintaining Java API documentation | Can be used alongside HTML and JavaDoc tags. |
A practical approach is to separate experiments from migration blockers. Try preview or incubator features in isolated branches and verify the relevant compiler/runtime flags and compatibility constraints. For an upgrade assessment, begin with annotation processing and dependencies on deprecated Unsafe methods, then benchmark ZGC if you use it. Java 23’s release notes and migration guide are available from Oracle’s Java 23 documentation index.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

