Solved

Consider the Following Code Snippet

Question 47

Multiple Choice

Consider the following code snippet. File inputFile = new File("dataIn.txt") ;
Scanner in = new Scanner(inputFile) ;
While (in.hasNext() )
{
String input = in.next() ;
}
Which of the following statements about this code is correct?


A) This code will read in a word at a time from the input file.
B) This code will read in the entire input file in one operation.
C) This code will read in a line at a time from the input file.
D) This code will read in a character at a time from the input file.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions