Java Input/Output  «Prev  Next»

 

JavaIO -Streams - Quiz

Each question is worth one point. Select the best answer or answers for each question.
1. What standard Java package provides support for I/O?
Please select the best answer.
  A. java.io
  B. java.inputoutput
  C. java.stream

2. In Java I/O, a medium through which data is transferred is known as:
Please select the best answer.
  A. A socket
  B. A stream
  C. A pipeline


3. Which one of the following classes would you use to read data as a primitive Java data type?
Please select the best answer.
  A. InputStream
  B. DataInputStream
  C. Reader

4. What method in the OutputStream class is used to force the contents of an output buffer to be written to an output device?
Please select the best answer.
  A. reset()
  B. write()
  C. flush()


Your score is 0.0