Multiple choice

How many subclasses are there in the InputStream class?

  1. Nine

  2. Seven

  3. Eight

  4. Six

  5. Five

Reveal answer Fill a bubble to check yourself
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.