Java 13

Java 13 – Overview

Java 13 introduced few language specific features under preview mode to Java and multiple JVM enhancements. This is an introductory tutorial that explains the basic-to-advanced features of Java 13 and their usage in a simple and intuitive way.

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

Prerequisites

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

Java 13 is a major feature release and it has brought many JVM specific changes to JAVA and few language specific changes. It followed the Java release cadence introduced Java 10 onwards and it was releasd on Sept 2019, just six months after Java 12 release.

Java 13 is a non-LTS release.

New Features

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

  1. JEP 353 – Socket API Reimplementation – Underlying API is rewritten.
  2. FileSystems.newFileSystem() – Three new methods added to make it easy to use.
  3. JEP 354 – Switch Expressions – A preview feature allowing switch to use return values via yield.
  4. JEP 355 – Text Blocks – A preview feature to handle multiline strings like JSON, XML easily.
  5. String new methods – New Methods added to string to handle text blocks.
  6. DOM/SAX Factories – New methods added to add namespace support.
  7. Dynamic CDS Archive – CDS archive can be created easily.
  8. JEP 351 – ZGC Enhancements – ZGC enhanced to return unused heap memory to operating system.

Java 13 enhanced numerous APIs with new methods and options. We’ll see these changes in next chapters.

About the Author: Elavarasan PK

Technical Specialist, Intersoft Data Labs