Java 10

Java 10 – Overview

Java 10 is a major feature release of Java programming language. This is an introductory tutorial that explains the basic-to-advanced features of Java 10 and their usage in a simple and intuitive way.

This tutorial is designed for Java programmers who would like to understand the Java 10 new features and actual usage.

Prerequisites

Before proceeding with this tutorial, you should have a good understanding of Java programming language.

Java 10 is a major release in Java release cadence and it was releasd on March 10, 2018. With Java 10, Oracle has changed the java release cadence to a new model, a 6 month release cadence and LTS model for Oracle Java SE products. LTS model stands for Long Term Support model.

From Java 10 onwards, Oracle releases a new version of Java after every 6 month where each version contains one or two major features. Oracle uses a release train concept. Each release train is scheduled for 6 months. Features which are developed within this timeline are shipped in the release otherwise the features are moved to next release train.

Oracle JDK vs OpenJDK

Most of the Oracle JDK binaries are propriety and licensed by Oracle and have multiple restrictions on redistribution. Whereas OpenJDK is more developer community friendly. From Java 10 onwards, Oracle has decided to promote OpenJDK as primary JDK to facility community based development of Java. Oracle will keep producing its own JDKs but it will release them after 3 years and term them as LTS version. So OpenJDK binaries will be released after every six month.

OpenJDK is cloud and container friendly as it can freely distributed as part of the container. So Oracle’s move to promote OpenJDK makes java more friendly towards cloud or container development and deployment.

Java 9 and Java 10 are non-LTS release. Java 11 release is a LTS release.

New Features

Following are the major new features which are introduced in Java 10.

  1. JEP 286 − Local Variable Type Inference
  2. JEP 322 − Time-Based Release Versioning
  3. JEP 304 − Garbage-Collector Interface
  4. JEP 307 − Parallel Full GC for G1
  5. JEP 316 − Heap Allocation on Alternative Memory Devices
  6. JEP 296 − Consolidate the JDK Forest into a Single Repository
  7. JEP 310 − Application Class-Data Sharing
  8. JEP 314 − Additional Unicode Language-Tag Extensions
  9. JEP 319 − Root Certificates
  10. JEP 317 − Experimental Java-Based JIT Compiler
  11. JEP 312 − Thread-Local Handshakes
  12. JEP 313 − Remove the Native-Header Generation Tool
  13. JEP 319 − Root Certificates
  14. JEP 319 − Root Certificates

Java 10 enhanced 70+ APIs with new methods and options and removed deprecated APIs and options. We’ll see these changes in next chapters.

About the Author: Elavarasan PK

Technical Specialist, Intersoft Data Labs