How many subclasses of the Writer class are there in Java?
A
Correct answer
Explanation
There are 7 subclasses of the Writer class in Java.
These are:
- OutputStreamWrite for writing a character stream
- BufferedWriter for buffering other writers
- PrintWriter for writing formatted data
- PipedWriter for writing to a pipe
- CharArrayWriter for writing to a char array
- StringWriter for writing to a string
- FilterWriter for writing filtered streams.
So, this is the correct answer.