Which of the following statements is correct to create a DataOutputStream to write to a file named out.dat?

a. DataOutputStream outfile = new DataOutputStream(new File("out.dat"));
b. DataOutputStream outfile = new DataOutputStream(new FileOutputStream("out.dat"));
c. DataOutputStream outfile = new DataOutputStream(FileOutputStream("out.dat"));
d. DataOutputStream outfile = new DataOutputStream("out.dat");


b

Computer Science & Information Technology

You might also like to view...

The ____________________ data type is used to store monetary values.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

( *max )( num1, num2, num3 );:

a. Is the header for function max. b. Is a call to the function pointed to by max. c. Is the prototype for function max. d. Is a declaration of a pointer to a function called max.

Computer Science & Information Technology

You can upgrade a CPU by adding registers and cache memory to it

Indicate whether the statement is true or false

Computer Science & Information Technology

Port mirroring

What will be an ideal response?

Computer Science & Information Technology