How many subclasses of the OutputStream Class are present in Java?
C
Correct answer
Explanation
There five subclasses of the OutputStream class are:
- FileOutputStream for writing bytes into file
- ObjectOutputStream for writing objects and primitive data types to output stream.
- ByteArrayOutputStream for output stream that writes byte into array.
- pipedOutputStream for writing into a piped stream.
- FilterOutputStream for filtering output into an existing stream.
So, this is the correct answer.