Introduction

In this post am are going to look at some of the new features introduced to the Java language from versions 7,8,9,10,11 & 12. By no means should this list be considered as a comprehensive feature list, but I shall aim to capture some of the more striking features & syntax additions that I particularly found interesting.

But 1st back to the beginning:

JDK 1.0 (1996)
JDK 1.1 (1997)
J2SE 1.2 (1998) – This & subsequent releases were rebranded retrospectively Java 2.
J2SE 1.3 (2000)
J2SE 1.4 (2002)
J2SE 5.0 (2004) – Originally numbered 1.5
Java SE 6 (2006) – As of this version, Sun replaced the name “J2SE” with Java SE and dropped the “.0” from the version number

Java 7 – July 2011 – Oracle bought Sun System

  1. Diamond Operator
  2. String Switch
  3. Underscore in Numeric Value
  4. Multi try catch
  5. Try with Resource
  6. New IO API
  7. G1 garbage Collector (Garbage 1st)

Java 8 – March 2014 – LTS

  1. Lambda Expressions
  2. Functional Interfaces
  3.  Pre-defined Functional Interfaces (Predicate/Function/Consumer/Supplier/Binary/Unary)
  4. Interface default/static methods
  5. Method reference
  6. Streams API
    1. Parallel streams
  7. Time & Date API

Java 9 – September 2017

  1. Removal of deprecated APIs
  2. Private Methods in interfaces
  3. Enhanced resource try-catch
  4. Streams new methods
    1. takeWhile – Takes values while the filter is true, then stops at the first false condition
    2. dropWhile
    3. ofNullable
  5. System Process API
  6. Java Platform Module System (JPMS)
  7. JLink – Default JRE is not recommended for small IOT devices due to memory size. Jlink lets you specify which modules to include in a custom runtime
  8. JShell (IntelliJ Tools > JShell Console)
  9. JDep

Java 10 – March 2018

  1. Oracle Time based release versioning
  2. Code Repositories Consolidation (CORBA, HotSpot, JDK, JAXP, JAX-WS, langtools, Nashorn, and ROOT)
  3. Garbage Collector Interface Update
  4. Local variable var (e.g. var myMap = new HashMap<>(); ) The variable type is still strongly typed, but the type is inferred from the assignment.

Java 11 – September 2018 LTS

  1. Nashorn deprecated – Calling JavaScript function from Java is encouraging developers to use GraalVM virtual machine instead
  2. JavaFX module Decoupled
  3. SOAP (java.xml.ws) is deprecated and may be removed. Others include (java.corba/jdk.snmp/java.xml/bind)
  4. Tools removed (appletviewer /wsimport/wsgen/schemagen/Xjs)
  5. String new methods (isBlank()/lines()/repeat(n)/strip()/stripLeading()/stripTrailing())
  6. HTTP client updated code
  7. Lambda Enhancement (@Min(value = 10) var a, final b) -> (a + b)

Java 12 – March 2019

  1. Switch Expression new syntax
  2. Number format ‘getCompactNumberInstance’
  3. String indent/transform new methods

Java 13 – September 2019

  1. Text blocks (preview JEP 368):

Java 14 – March 2020 – LTS

  1. Records (JEP 359):
  2. Pattern Matching for instanceof (JEP305):
  3. JFR Event Screening (JEP 349):
  4. NUMA – Aware Memory Allocation for G1 (JEP 345):
  5. jpackage (JEP 392 )

Java 15 – September 2020

Java 16 – March 2021

  1. mapMulti in streams

Java 17 – September 2021 – LTS

Leave a comment