Difference between Exception and Error

In Java, both exceptions and errors are subclasses of the Throwable class. The error indicates a problem that occurs mainly due to lack of system resources, and our application should not catch this type of…

Java 14 – Switch Expressions

Java 12 introduces expressions to Switch statement and released it as a preview feature. Java 13 added a new yield construct to return a value from switch statement. With Java 14, switch expression now is…

Java 14 – 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 14 – Overview

Java 14 introduced few language specific features under preview mode to Java and multiple JVM enhancements. This is an introductory tutorial that explains the basic-to-advanced features of Java 13 and their usage in a simple…

Java 13 – Dynamic CDS archive

CDS, Class Data Sharing is an important feature of JVM to boost the startup time of an application loading. As it allows to share class metadata across different JVMs, it reduces the startup time and…

Java 13 – ZGC Enhancements

The ZGC or Z Garbage Collector was introduced with Java 11 as a low latency garbage collection mechnism. ZGC makes sure that Garbage Collection pause time is not dependent on heap size. It will never…

Java 13 – Socket API Reimplementation

Java 13 have reimplemented the Java Socket API. Old Socket APIs like java.net.Socket and java.net.ServerSocket has been replaced. PlainSocketImpl is no more in use, now the Socket API provider points to NioSocketImpl. New implementation leverages the java.nio infrastructure for…