TypeScript Type Inference

In this tutorial, you will learn about the Type inference in TypeScript. Type inference describes where and how TypeScript infers types when you don’t explicitly annotate them. Basic type inference When you declare a variable, you can…

TypeScript String Literal Types

In this tutorial, you will learn about the TypeScript string literal types that define a type that accepts a specified string literal. The string literal types allow you to define a type that accepts only…

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…

TypeScript union Type

In this tutorial, you will learn about the TypeScript union type that allows you to store a value of one or several types in a variable. Introduction to TypeScript union type Sometimes, you will run…

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…

TypeScript never Type

In this tutorial, you will learn about the TypeScript never type that contains no value. The never type is a type that contains no values. Because of this, you cannot assign any value to a variable with a never type. Typically,…