Java OCA OCP Practice Question 438

Question

Which of the following are valid arguments to the DataInputStream constructor?

  • A. File
  • B. FileReader
  • C. FileInputStream
  • D. RandomAccessFile


C.

Note

A DataInputStream reads bytes from its data source, which must be an InputStream.

The only valid option is C, FileInputStream.




PreviousNext

Related