Java version history

In the current Java landscape, Java 8 is still the used version, even though it’s support cycle is ending. Java 11, the latest LTS release, is slowly gaining popularity. This can be explained by changes implemented in Java 9, which make the switch to posting 8 versions non-trivial.

Here we are going to recap versions from 8 to the latest one, 13.

Java 8
Was released on 18th March 2014. Currently the most prominent Java version in production.
Support for commercial users stopped in January 2019, but it will be supported for personal users until December 2020.

  • Biggest change is adding support for lambda expressions under Project Lambda. This also enables functional-style operations on streams and MapReduce transformations on Collections.
  • New Date and Time API, based on Joda Time project
  • Project Nashorn, a JavaScript runtime which allows developers to embed JavaScript code within applications

Java 9
Planned to be released in 2016, but finally released on 21st September 2017. The addition of JDK modularization made switching to this version of Java from the older version a considerable effort. Notable updates:

  • Modularization of the JDK under Project Jigsaw
  • JShell: The Java Shell
  • Ahead of time compilation
  • XML catalogs
  • Java implementation of Reactive Streams

Java 10
Released on 20th March 2018. First version to be released under new cadence. New versions would be released every six months. LTS version will be released every 3 years. Notable updates:

  • Local-variable type inference
    var x = new ArrayList<String>();
  • Experimental Java-based JIT compiler
  • Application class-data sharing

Java 11
Current LTS(Long Term Support) version, released on 25th September 2018. Notable updates:

  • Local-Variable Syntax for Lambda Parameters which allows:
    list.stream()
    .map((@Notnull var s) -> s.toLowerCase())
    .collect(Collectors.toList());
  • Launch Single-File Source-Code Programs
  • HTTP Client (Standard)
  • Remove the Java EE and CORBA Modules
  • Transport Layer Security (TLS) 1.3
  • Deprecate Project Nashorn

Java 12
Released on 19th March 2019. Important updates include:

  • JVM Constants API
  • A Low-Pause-Time Garbage Collector
  • Abortable Mixed Collections for G1
  • Promptly Return Unused Committed Memory from G1

Java 13
Currently, the newest version of Java released on 17th September 2019. Notable updates:

  • Reimplementation of Legacy Socket API
  • Dynamic CDS Archives
  • ZGC: Uncommit Unused Memory

It also includes previews of Text Blocks and Switch Expressions

String htmlBlock = """
                       <html>
                         <body>
                           <p>My web page</p>
                         </body>
                       <html>
                      """;

Switch Expression:
    int numberOfLetters = switch (dayOfWeek) {
       case MONDAY, FRIDAY, SUNDAY -> 6;
       case TUESDAY -> 7;
       case THURSDAY, SATURDAY -> 8;
       case WEDNESDAY -> 9;
       default -> throw new IllegalStateException("Huh?: " + day);
    };