Java Input/Output  «Prev   Next»

Java DataStreams - Quiz

Each question is worth one point. Select the best answer or answers for each question.
1. To read Java data types, you can create an instance of what kind of class and associate it with a target?
Please select the best answer.
  A. DataInput
  B. DataInputStream
  C. InputStream

2. To create a DataInputStream tied to the standard input, you can write
Please select the best answer.
  A. new DataInputStream(System.out);
  B. new DataInputStream("in");
  C. new DataInputStream(;

3. Given a BufferedReader object reference named dataIn, which line of code would read one line of data into a String object reference named s?
Please select the best answer.
  A. s = dataIn.readLine()
  B. s =
  C. s.readLine()

Your score is 0.0