SCJP Module-11 Question-7


 

SCJP Module-11 Question-7

The Sample program given below will test your understanding about the constructor of the FileOutputStream class in Java.

The Sample program given below will test your understanding about the constructor of the FileOutputStream class in Java.

Which constructs a DataOutputStream?

(A) New dataOutputStream("student.ser");
(B) New dataOutputStream(new file("student.ser"));
(C) New dataOutputStream(new OutputStream("student.ser"));
(D) New dataOutputStream(new FileOutputStream("student.ser"));

Choose the correct option?

Answer:

(D)

Ads