Java Input Output - Quiz Explanation

The answers you selected are indicated below, along with text that explains the correct answers.

 
1. The top-level, abstract stream classes in Java are
Please select the best answer.
  A. ReadStream and WriteStream
  B. InputStream and OutputStream
  C. Field and Stream
  The correct answer is B: InputStream and OutputStream. Field and Stream will help you with fly-fishing, but not with Java.


2. Instances of class DataInputStream can
Please select the best answer.
  A. Read only generic bytes from a resource
  B. Read specific, simple data types from a resource
  C. Read only generic char from a resource
  The correct answer is B. DataInputStream contains methods that can read Java data types.


3. The standard input is represented by the variable
Please select the best answer.
  A. System.in
  B. standardInput
  C. System.keyboard
  The correct answer is A.
The standard input is represented by System.in.