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 are the. 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.