The Reader class of the java.io package is an abstract superclass that represents a stream of characters. Since Reader is an abstract class, it is not useful by itself. However, its subclasses can be used to read data. In order to use the functionality of Reader, we can use its subclasses. Some of them are:
In order to create a Reader, we must import the java.io.Reader package first. Once we import the package, here is how we can create the reader.
Here, we have created a reader using the FileReader class. It is because Reader is an abstract class. Hence we cannot create an object of Reader.