Every Java version, and what it added

From JDK 1.0 in 1996 to Java 27 in 2026. Search for a feature to find the version that introduced it, or plan an upgrade between any two versions.

Upgrade planner

See everything you gain, and everything that was removed, between two versions.

Java 25 to 27 spans 2 releases, with 7 finished features to adopt and 2 removals or restrictions to check before you migrate.

Libraries and APIs (1)

  • HTTP/3 in the HTTP Client API Java 26

JVM, GC and performance (4)

  • Ahead-of-time object caching works with any GC, including ZGC Java 26
  • G1 throughput improved by reducing synchronization Java 26
  • G1 is the default garbage collector in every environment Java 27
  • Compact object headers on by default Java 27

Tools (1)

  • JFR redacts sensitive data in-process Java 27

Security (1)

  • Post-quantum hybrid key exchange for TLS 1.3 Java 27

Check before migrating (2)

  • Warnings when deep reflection mutates final fields Java 26
  • Applet API removed Java 26

28 releases since 1996, newest first.

28
JDK 28
Planned for Mar 2027
Targeted, may change
  • Shenandoah uses generational mode by default (JVM, GC and performance)
  • PEM encodings of cryptographic objects, final (proposed) (Security)
  • macOS x64 port deprecated for removal (Removed or restricted)
27
Java SE 27
Released 15 Sep 2026
Newer than your JDK
  • G1 is the default garbage collector in every environment (JVM, GC and performance)
  • Compact object headers on by default (JVM, GC and performance)
  • Post-quantum hybrid key exchange for TLS 1.3 (Security)
  • JFR redacts sensitive data in-process (Tools)
26
Java SE 26
Released 17 Mar 2026
Newer than your JDK
  • HTTP/3 in the HTTP Client API (Libraries and APIs)
  • Ahead-of-time object caching works with any GC, including ZGC (JVM, GC and performance)
  • G1 throughput improved by reducing synchronization (JVM, GC and performance)
  • Warnings when deep reflection mutates final fields (Removed or restricted)
  • Applet API removed (Removed or restricted)
25
Java SE 25
Released 16 Sep 2025
LTSYour JDK
  • Compact source files and instance main methods (Language)
  • Module import declarations (import module java.base) (Language)
  • Flexible constructor bodies: code before super(...) (Language)
  • Scoped values (Libraries and APIs)
  • Key derivation function API (Security)
  • Compact object headers (JVM, GC and performance)
  • Generational Shenandoah (JVM, GC and performance)
  • AOT command-line ergonomics and method profiling for faster warm-up (JVM, GC and performance)
  • JFR cooperative sampling, method timing and tracing (Tools)
  • 32-bit x86 port removed (Removed or restricted)
What Java 25 code looks like
void main() {
    String name = IO.readln("Your name: ");
    IO.println("Hello, " + name);
}
24
Java SE 24
Released 18 Mar 2025
Available to you
  • Stream gatherers: custom intermediate operations (Libraries and APIs)
  • Class-File API (Libraries and APIs)
  • Virtual threads no longer pinned by synchronized (JVM, GC and performance)
  • Ahead-of-time class loading and linking (Project Leyden) (JVM, GC and performance)
  • Quantum-resistant ML-KEM and ML-DSA algorithms (Security)
  • Late barrier expansion for G1 (JVM, GC and performance)
  • Security Manager permanently disabled (Removed or restricted)
  • Windows 32-bit x86 port removed (Removed or restricted)
  • Non-generational ZGC mode removed (Removed or restricted)
  • Warnings on sun.misc.Unsafe memory-access methods (Removed or restricted)
What Java 24 code looks like
List<List<Integer>> batches = Stream.of(1, 2, 3, 4, 5, 6, 7)
    .gather(Gatherers.windowFixed(3))
    .toList();   // [[1, 2, 3], [4, 5, 6], [7]]
23
Java SE 23
Released 17 Sep 2024
Available to you
  • Markdown documentation comments (///) (Tools)
  • ZGC uses generational mode by default (JVM, GC and performance)
  • String templates withdrawn (Removed or restricted)
  • sun.misc.Unsafe memory-access methods deprecated for removal (Removed or restricted)
22
Java SE 22
Released 19 Mar 2024
Available to you
  • Foreign Function and Memory API (Libraries and APIs)
  • Unnamed variables and patterns (_) (Language)
  • Launch multi-file source programs (Tools)
  • Region pinning for G1 (JVM, GC and performance)
What Java 22 code looks like
try {
    Integer.parseInt(input);
    return true;
} catch (NumberFormatException _) {   // unnamed variable
    return false;
}
21
Java SE 21
Released 19 Sep 2023
LTSAvailable to you
  • Virtual threads (Libraries and APIs)
  • Pattern matching for switch (Language)
  • Record patterns (Language)
  • Sequenced collections: getFirst, getLast, reversed (Libraries and APIs)
  • Generational ZGC (JVM, GC and performance)
  • Key encapsulation mechanism API (Security)
  • Windows 32-bit x86 port deprecated for removal (Removed or restricted)
  • Warnings when agents are loaded dynamically (Removed or restricted)
What Java 21 code looks like
try (var executor = Executors.newVirtualThreadPerTaskExecutor()) {
    requests.forEach(r -> executor.submit(() -> handle(r)));
}
20
Java SE 20
Released 21 Mar 2023
Available to you

No finished features in this release; it only previewed or incubated 7 features. Turn on “Include previews and incubators” to see them.

19
Java SE 19
Released 20 Sep 2022
Available to you
  • Linux on RISC-V port (JVM, GC and performance)
18
Java SE 18
Released 22 Mar 2022
Available to you
  • UTF-8 is the default charset everywhere (Libraries and APIs)
  • Simple web server (jwebserver) (Tools)
  • Code snippets in Javadoc (@snippet) (Tools)
  • Core reflection reimplemented with method handles (JVM, GC and performance)
  • Internet-address resolution SPI (Libraries and APIs)
  • Finalization deprecated for removal (Removed or restricted)
17
Java SE 17
Released 14 Sep 2021
LTSAvailable to you
  • Sealed classes (Language)
  • New random number generator API (RandomGenerator) (Libraries and APIs)
  • Always-strict floating point (Language)
  • macOS on Apple Silicon (AArch64) port (JVM, GC and performance)
  • Context-specific deserialization filters (Security)
  • Strong encapsulation of JDK internals, no opt-out flag (Removed or restricted)
  • Security Manager deprecated for removal (Removed or restricted)
  • RMI Activation removed (Removed or restricted)
  • Applet API deprecated for removal (Removed or restricted)
  • Experimental AOT and Graal JIT compilers removed (Removed or restricted)
What Java 17 code looks like
sealed interface Payment permits Upi, Card {}
record Upi(String vpa) implements Payment {}
record Card(String last4) implements Payment {}
16
Java SE 16
Released 16 Mar 2021
Available to you
  • Records (Language)
  • Pattern matching for instanceof (Language)
  • Stream.toList() (Libraries and APIs)
  • Stream.mapMulti (Libraries and APIs)
  • jpackage installer tool (Tools)
  • Unix-domain socket channels (Libraries and APIs)
  • Elastic Metaspace (JVM, GC and performance)
  • JDK internals strongly encapsulated by default (Removed or restricted)
  • OpenJDK moves to Git and GitHub (Tools)
What Java 16 code looks like
record Point(int x, int y) {}

if (obj instanceof Point p) {
    System.out.println(p.x());
}
15
Java SE 15
Released 15 Sep 2020
Available to you
  • Text blocks (Language)
  • Hidden classes for frameworks (Libraries and APIs)
  • ZGC ready for production (JVM, GC and performance)
  • Shenandoah ready for production (JVM, GC and performance)
  • EdDSA signatures (Security)
  • Nashorn JavaScript engine removed (Removed or restricted)
  • Biased locking disabled and deprecated (Removed or restricted)
What Java 15 code looks like
String sql = """
    SELECT id, title
    FROM course
    WHERE level = ?
    """;
14
Java SE 14
Released 17 Mar 2020
Available to you
  • Switch expressions (Language)
  • Helpful NullPointerException messages (JVM, GC and performance)
  • JFR event streaming (Tools)
  • CMS garbage collector removed (Removed or restricted)
  • Pack200 tools removed (Removed or restricted)
What Java 14 code looks like
String kind = switch (day) {
    case SATURDAY, SUNDAY -> "Weekend";
    default -> "Weekday";
};
13
Java SE 13
Released 17 Sep 2019
Available to you
  • Dynamic CDS archives (JVM, GC and performance)
  • ZGC returns unused memory to the OS (JVM, GC and performance)
  • Legacy Socket API reimplemented (Libraries and APIs)
12
Java SE 12
Released 19 Mar 2019
Available to you
  • String.indent and transform (Libraries and APIs)
  • Collectors.teeing (Libraries and APIs)
  • Files.mismatch (Libraries and APIs)
  • Compact number formatting (1K, 2M) (Libraries and APIs)
  • Default CDS archives for faster startup (JVM, GC and performance)
11
Java SE 11
Released 25 Sep 2018
LTSAvailable to you
  • Standard HTTP Client (java.net.http) (Libraries and APIs)
  • String isBlank, lines, strip and repeat (Libraries and APIs)
  • Files.readString and writeString (Libraries and APIs)
  • var in lambda parameters (Language)
  • Run a single source file directly: java Hello.java (Tools)
  • Optional.isEmpty and Predicate.not (Libraries and APIs)
  • TLS 1.3 (Security)
  • Epsilon no-op garbage collector (JVM, GC and performance)
  • Flight Recorder open-sourced (Tools)
  • Java EE and CORBA modules removed (JAXB, JAX-WS) (Removed or restricted)
  • Applets and Java Web Start dropped from Oracle JDK (Removed or restricted)
What Java 11 code looks like
var client = HttpClient.newHttpClient();
var req = HttpRequest.newBuilder(URI.create("https://api.example.com/courses")).build();
String body = client.send(req, HttpResponse.BodyHandlers.ofString()).body();
10
Java SE 10
Released 20 Mar 2018
Available to you
  • var for local variables (Language)
  • List.copyOf, Set.copyOf and Map.copyOf (Libraries and APIs)
  • Optional.orElseThrow() (Libraries and APIs)
  • Collectors.toUnmodifiableList and friends (Libraries and APIs)
  • Parallel full GC for G1 (JVM, GC and performance)
  • Application class-data sharing (JVM, GC and performance)
  • Time-based releases every six months begin (Tools)
What Java 10 code looks like
var lessonsByCourse = new HashMap<String, List<Lesson>>();
9
Java SE 9
Released 21 Sep 2017
Available to you
  • Module system (module-info.java) (Language)
  • JShell interactive REPL (Tools)
  • Collection factories: List.of, Set.of, Map.of (Libraries and APIs)
  • Private methods in interfaces (Language)
  • try-with-resources on effectively final variables (Language)
  • Stream takeWhile, dropWhile and ofNullable (Libraries and APIs)
  • Optional.ifPresentOrElse, or and stream (Libraries and APIs)
  • ProcessHandle API (Libraries and APIs)
  • Reactive Streams Flow API (Libraries and APIs)
  • G1 becomes the default garbage collector (JVM, GC and performance)
  • Compact strings: Latin-1 text stored in one byte per char (JVM, GC and performance)
  • Multi-release JAR files (Tools)
What Java 9 code looks like
List<String> langs = List.of("Java", "Kotlin", "Scala");
Map<String, Integer> ports = Map.of("http", 80, "https", 443);
8
Java SE 8
Released 18 Mar 2014
LTSAvailable to you
  • Lambda expressions (Language)
  • Method references (String::length) (Language)
  • Default and static methods in interfaces (Language)
  • Stream API (Libraries and APIs)
  • Optional (Libraries and APIs)
  • java.time date and time API (Libraries and APIs)
  • CompletableFuture (Libraries and APIs)
  • Base64, StringJoiner and String.join (Libraries and APIs)
  • Repeating and type annotations (Language)
  • Nashorn JavaScript engine (Libraries and APIs)
  • PermGen removed, replaced by Metaspace (JVM, GC and performance)
What Java 8 code looks like
names.stream()
     .filter(n -> n.startsWith("A"))
     .map(String::toUpperCase)
     .forEach(System.out::println);
7
Java SE 7, “Dolphin”
Released 28 Jul 2011
Available to you
  • try-with-resources (Language)
  • Diamond operator <> (Language)
  • Strings in switch (Language)
  • Multi-catch: one catch block for several exception types (Language)
  • Binary literals and underscores in numbers (1_000_000) (Language)
  • NIO.2: Path, Files and WatchService (Libraries and APIs)
  • Fork/Join framework (Libraries and APIs)
  • Objects utility class (Libraries and APIs)
  • invokedynamic bytecode for dynamic languages (JVM, GC and performance)
  • G1 garbage collector supported (7u4) (JVM, GC and performance)
What Java 7 code looks like
try (BufferedReader r = Files.newBufferedReader(path)) {
    return r.readLine();
}   // r is closed automatically
6
Java SE 6, “Mustang”
Released 11 Dec 2006
Available to you
  • Scripting API (JSR 223) with a JavaScript engine (Libraries and APIs)
  • Compiler API (javax.tools) (Libraries and APIs)
  • JDBC 4.0 with automatic driver loading (Libraries and APIs)
  • Pluggable annotation processing (JSR 269) (Libraries and APIs)
  • @Override allowed on interface method implementations (Language)
  • JAX-WS and JAXB bundled for web services and XML binding (Libraries and APIs)
  • Major JVM and startup performance improvements (JVM, GC and performance)
5
J2SE 5.0, “Tiger”
Released 30 Sep 2004
Available to you
  • Generics (Language)
  • Annotations (Language)
  • Enums (Language)
  • Autoboxing and unboxing (Language)
  • Varargs (Language)
  • Enhanced for-each loop (Language)
  • Static imports (Language)
  • java.util.concurrent: executors, ConcurrentHashMap, locks, atomics (Libraries and APIs)
  • StringBuilder (Libraries and APIs)
  • Scanner and printf-style formatting (Libraries and APIs)
  • Revised Java Memory Model (JSR 133) (JVM, GC and performance)
What Java 5 code looks like
List<String> names = new ArrayList<String>();
for (String n : names) {
    System.out.printf("Hello %s%n", n);
}
1.4
J2SE 1.4, “Merlin”
Released 6 Feb 2002
Available to you
  • assert keyword (Language)
  • Regular expressions (java.util.regex) (Libraries and APIs)
  • NIO: buffers, channels and non-blocking I/O (Libraries and APIs)
  • Exception chaining with getCause() (Libraries and APIs)
  • Logging API (java.util.logging) (Libraries and APIs)
  • XML parsing (JAXP) built in (Libraries and APIs)
  • JCE, JSSE and JAAS security bundled (Security)
1.3
J2SE 1.3, “Kestrel”
Released 8 May 2000
Available to you
  • HotSpot JVM becomes the default (JVM, GC and performance)
  • Dynamic proxies (java.lang.reflect.Proxy) (Libraries and APIs)
  • JNDI naming and directory API (Libraries and APIs)
  • Java Sound API (Libraries and APIs)
1.2
J2SE 1.2, “Playground”
Released 8 Dec 1998
Available to you
  • Collections Framework: List, Set, Map (Libraries and APIs)
  • Swing user interface toolkit (Libraries and APIs)
  • JIT compiler included by default (JVM, GC and performance)
  • strictfp keyword (Language)
  • Fine-grained security policies and permissions (Security)
1.1
JDK 1.1
Released 19 Feb 1997
Available to you
  • Inner, nested and anonymous classes (Language)
  • JDBC database connectivity (Libraries and APIs)
  • Reflection API (Libraries and APIs)
  • Object serialization (Libraries and APIs)
  • RMI for remote method calls (Libraries and APIs)
  • JavaBeans component model (Libraries and APIs)
1.0
JDK 1.0
Released 23 Jan 1996
Available to you
  • Classes, interfaces, exceptions and garbage collection (Language)
  • Core libraries: java.lang, java.io, java.util, java.net (Libraries and APIs)
  • Threads and the synchronized keyword (Libraries and APIs)
  • AWT user interfaces and browser applets (Libraries and APIs)