Java 12 – Overview

Java 12 - Overview

This topic is about Java 12 – Overview.

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

Java 12 is a non-LTS release.

New Features

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

  • JVM Changes โˆ’ JEP 189, JEP 346, JEP 344, and JEP 230.
  • Switch Expressions โˆ’ A preview feature allowing switch to use lambda expression.
  • File.mismatch() method โˆ’ File Comparison is made easy via mismatch method.
  • Compact Number Formatting โˆ’ Numbers can be formatted like 2K, 3M etc easily.
  • Teeing Collector in Stream API โˆ’ A merging operator on multiple collectors.
  • String new methods โˆ’ four new methods introduced to format a string.
  • JEP 334 โˆ’ JVM Constants API introduced.
  • JEP 305 โˆ’ A preview feature allowing pattern matching for instanceOf.

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

In this topic we learned about Java 12 – Overview. To know more, Click Here.

Leave a Reply