Java 12 – Teeing Collectors

Java 12 introduces a new method to Collectors to perform two different operations on collection and then merge the result. Following is the syntax of teeing method − Here we are performing different functions on…

Java 12 – Compact Number Formatting

Java 12 introduces compact formatting where we can format long numbers for decimal, currency or percentages to short form or long form. For example 3000 to 3K. Folloiwng syntax shows the usage − Consider the…

Java 12 – File mismatch method

Java 12 introduces an easy way to compare two files using following syntax − public static long mismatch(Path path1, Path path2) throws IOException Where If there is no mismatch then 1L is returned else position…

Java 12 – Switch Expressions

Java 12 introduces expressions to Switch statement and released it as a preview feature. Following are the changes introduced in case of new switch with expressions − No fallthrough. No break statment required to prevent…

Java 12 – Environment Setup

If you want to set up your own environment for Java programming language, then this section guides you through the whole process. Please follow the steps given below to set up your Java environment. Java…

Java 12 – Overview

Java 12 introduced lot of new language specific features to Java. This is an introductory tutorial that explains the basic-to-advanced features of Java 12 and their usage in a simple and intuitive way. This tutorial…