Java 14

Related Tags

Tutorials

Java 14

Java 14 – New Features and Improvements

Java 14 reached general availability on 17 March 2020. In this post, we will go through some features from the list of 16 new features added in Java programming language. We can find the JDK 14 binaries here. 1. JEP 305 – Pattern Matching for instanceof (Preview) In Java 14, instanceof operator has been modified …

Java Text Blocks

In Java, a text block is a multi-line string literal. It means we do not need to get into the mess of explicit line terminators, string concatenations, and delimiters.

Java 14 – Helpful NullPointerException (NPE)

Java 14 (JEP 358) improves the usability of NullPointerException generated by the JVM by describing precisely which variable was null. Lets understand this in detail. 1. Better NullPointerException First, we need to pass -XX:+ShowCodeDetailsInExceptionMessages JVM flag to enable this feature while running the application. Make sure, you are passing it. …

Java Enhanced Switch Expressions

In Java, a switch statement generally allows the application to have multiple possible execution paths based on the value of a given expression in runtime. The evaluated expression is called the selector expression which must be of type char, byte, short, int, Character, Byte, Short, Integer, String, or an enum. …

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.