Multiple Choice
Consider the following code snippet: Scanner in = new Scanner(. . .) ;
While (in.hasNextLine() )
{
String input = in.nextLine() ;
System.out.println(input) ;
}
Which of the following statements about this code is correct?
A) This code will read in an entire line from the file in each iteration of the loop.
B) This code will read in the entire contents of the file in a single iteration of the loop.
C) This code will read in a single word from the file in each iteration of the loop.
D) This code will read in a single character from the file in each iteration of the loop.
Correct Answer:

Verified
Correct Answer:
Verified
Q87: The Java compiler requires that your program
Q88: Insert the missing code in the following
Q89: Which of the following statements about reading
Q90: When reading words with a Scanner object,
Q91: Under which condition will the Scanner constructor
Q93: Which of the following statements reflects the
Q94: An example of a fatal error that
Q95: Which of the following is the correct
Q96: Consider the following code snippet: public static
Q97: Insert the missing code in the following