In this article we will learn about Console class in Java.
In JDK 1.5 a new class was introduced under IO package i.e. Console class which is a concrete class. Although Console class is a concrete class we can’t create object of this class but we can retrieve the reference of console object by using System.Console.
Since Console class has a private constructor that is why we are unable to create an object to Console class.
Let us take a look at the below program: