How many subclasses are there in the InputStream class?
-
Nine
-
Seven
-
Eight
-
Six
-
Five
B
Correct answer
Explanation
There are seven subclasses of InputStream class.
These are
1) FileInputStream for reading bytes from a file
2) ObjectInputStream for reading objects and primitive data types from input stream
3) SequenceInputStream for reading from a sequence of streams
4) ByteArrayInputStream for a stream that reads a byte array
5) pipedInputStream for reading from a piped stream
6) FilterInputStream for filtering input from the existing Stream
7) StringBufferInputStream for reading from a string.