Java version history and features
Java has evolved through many versions. Since Java 9, Oracle adopted a time‑based release model with a new version every six months. Long‑Term Support (LTS) versions receive updates for several years.
Major versions and key features
Section titled “Major versions and key features”| Version | Release | Type | Key Features |
|---|---|---|---|
| Java 1.0 | 1996 | First public release. | |
| Java 1.1 | 1997 | Inner classes, JavaBeans, JDBC, RMI. | |
| Java 1.2 (Java 2) | 1998 | Swing, Collections framework, JIT compiler. | |
| Java 1.3 | 2000 | HotSpot JVM, RMI improvements. | |
| Java 1.4 | 2002 | Assertions, NIO, logging API, XML support. | |
| Java 5 | 2004 | Generics, enhanced for‑loop, enums, annotations, static import. | |
| Java 6 | 2006 | Scripting (Rhino), improved performance, JDBC 4.0. | |
| Java 7 | 2011 | Try‑with‑resources, NIO2 (WatchService, Path API), fork/join. | |
| Java 8 | 2014 | LTS | Lambda expressions, Stream API, date/time API (java.time), default methods. |
| Java 9 | 2017 | Modules (Project Jigsaw), JShell (REPL), private interface methods. | |
| Java 10 | 2018 | Local‑variable type inference (var). | |
| Java 11 | 2018 | LTS | HTTP Client (standard), launch single‑file programs, TLS 1.3. |
| Java 12 | 2019 | Switch expressions (preview), microbenchmark suite. | |
| Java 13 | 2019 | Text blocks (preview), switch expressions enhanced. | |
| Java 14 | 2020 | Records (preview), pattern matching for instanceof (preview). | |
| Java 15 | 2020 | Text blocks (standard), sealed classes (preview). | |
| Java 16 | 2021 | Records (standard), pattern matching for instanceof (standard). | |
| Java 17 | 2021 | LTS | Sealed classes, pattern matching for switch (preview), enhanced pseudo‑random generators. |
| Java 18 | 2022 | Simple web server, UTF‑8 by default, code snippets in javadoc. | |
| Java 19 | 2022 | Virtual threads (preview), pattern matching for switch (third preview). | |
| Java 20 | 2023 | Virtual threads (second preview), scoped values. | |
| Java 21 | 2023 | LTS | Virtual threads (final), record patterns, pattern matching for switch, sequenced collections. |
| Java 22 | 2024 | Unnamed variables, statements before super(), string templates (preview). | |
| Java 23 | 2024 | Latest features before JDK 24. | |
| Java 24 | March 18, 2025 | Stream Gatherers, Class-File API, Primitive types in patterns (second preview), Quantum-resistant cryptography (ML-KEM, ML-DSA), Vector API (ninth incubator), Structured Concurrency (fourth preview), Scoped Values (fourth preview), Compact Object Headers (experimental), AOT class loading & linking, ZGC non-generational mode removed, Virtual threads no longer pinning, G1 GC barrier expansion [citation:1][citation:4][citation:7]. | |
| Java 25 | September 16, 2025 | LTS | LTS release with continued improvements [citation:6]. |
| Java 26 | March 17, 2026 | HTTP/3 client, G1 GC throughput improvements, Primitive types in patterns (fourth preview), Lazy constants (second preview), PEM encoding API (second preview), Structured Concurrency (sixth preview), Vector API (11th incubator), Ahead-of-time object caching with any GC, Final removal of Applet API, Warnings for final field mutation via reflection, Unicode 17.0 support, JDBC 4.5 MR support, Duration min/max constants [citation:2][citation:5][citation:8]. |
Release cadence
Section titled “Release cadence”- Non‑LTS versions: every six months (March and September) – only supported until the next release.
- LTS versions: every few years (Java 8, 11, 17, 21, 25, …) – receive updates for at least 3 years (Oracle) or longer (OpenJDK distributions).
Choosing a version
Section titled “Choosing a version”For new projects, Java 21 or 25 (LTS) are recommended because they are stable and supported long‑term. However, you may also use the latest version (Java 26) to experiment with new features like HTTP/3 support and enhanced AI capabilities.
Backward compatibility
Section titled “Backward compatibility”Java is strongly committed to backward compatibility. Code written for Java 1.2 will generally run on Java 26, with rare exceptions for deprecated features removed after long deprecation cycles.