Java 11

Java 11 – Introduction

Java 11 is the first LTS (Long Term Support) feature release of Java programming language after Java 8. This is an introductory tutorial that explains the basic-to-advanced features of Java 11 and their usage in a simple and intuitive way.

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

Prerequisites

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

Java 11 is the first LTS , Long Term Support feature release after Java 8. It followed the Java release cadence introduced Java 10 onwards and it was released on Sept 2018, just six months after Java 10 release.

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 11.

  1. JEP 330 − Launch Single-File Source-Code Programs without compilation
  2. JEP 323 − Local-Variable Syntax for Lambda Parameters
  3. JEP 181 − Nest-Based Access Control
  4. JEP 331 − Low-Overhead Heap Profiling
  5. JEP 318 − Epsilon, A No-Op Garbage Collector
  6. JEP 333 − ZGC A Scalable Low-Latency Garbage Collector
  7. Collection API Updates − New Collection.toArray(IntFunction) Default Method.
  8. String API Updates − New methods added like repeat(), isBlank(), strip() and lines().
  9. Files API Updates − New methods added like readString(), and writeString().
  10. Optional Updates − New method added, isEmpty().
  11. JEP 321 − HTTP Client API standardized.

Java 11 enhanced numerous 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