Multiple choice

How many subclasses of OutputStream class are present in java?

  1. 9

  2. 6

  3. 5

  4. 8

  5. 7

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

There are five subclasses of OutputStream class.These are - 1) FileOutputStream - For writing bytes into file 2) ObjectOutputStream - For writing objects and primitive data types to output stream 3) ByteArrayOutputStream - For output stream that writes byte into array 4) pipedOutputStream - For writing into a piped stream 5) FilterOutputStream - For filtering output into an existing stream So, this is the correct answer.