
- Java 12 Tutorial
- Java 12 - Home
- Java 12 - Overview
- Java 12 - Environment Setup
- Java 12 - Switch Expressions
- Java 12 - File mismatch method
- Java 12 - Compact Number Formatting
- Java 12 - Teeing Collectors
- Java 12 - String methods
- Garbage Collection Enhancements
- Java 12 - Microbenchmark
- Java Tutorial
- Java 8 Tutorial
- Java 9 Tutorial
- Java 10 Tutorial
- Java 11 Tutorial
- Java 12 Useful Resources
- Java 12 - Quick Guide
- Java 12 - Useful Resources
- Java 12 - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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.