How many subclasses are there of the InputStream class?
B
Correct answer
Explanation
This is the correct answer. There are 7 subclasses of the InputStream class.
These are:
- FileInputStream for reading bytes from a file.
- ObjectInputStream for readin objects and primitive data types from input stream.
- SequenceInputStream for readin from a sequence of streams.
- ByteArrayInputStream for Stream that reads a byte array.
- pipedInputStream for reading from a piped stream.
- FilterInputStream for filtering input from Existing Stream.
- StringBufferInputStream for reading from a string.