Constructors in Java Reader Class
There are two constructors used with Java Reader Class as mentioned below:
- protected Reader(): Creates a new character-stream reader whose critical sections will synchronize on the reader itself.
- protected Reader(Object lock): Creates a new character-stream reader whose critical sections will synchronize on the given object.
Java.io.Reader class in Java
Java Reader class is an abstract class for reading character streams. The only methods that a subclass must implement are read(char[], int, int), and close(). Most subclasses, however, will override some of the methods defined here in order to provide higher efficiency, additional functionality, or both.