Multiple choice

How many subclasses of InputStream class are there?

  1. 9

  2. 7

  3. 8

  4. 6

  5. 5

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This is the correct answer. There are 7 subclasses of InputStream class. These are - 1) FileInputStream - For reading bytes from a file 2) ObjectInputStream - For readin objects and primitive data types from input stream 3) SequenceInputStream - For readin from a sequence of streams 4) ByteArrayInputStream - For Stream that reads a byte array 5) pipedInputStream - For reading from a piped stream 6) FilterInputStream - For filtering input from existing stream 7) StringBufferInputStream - For reading from a string