Multiple Choice
Assume that inputFile references a Scanner object that was used to open a file. Which of the following while loops is the correct way to read data from the file until the end of the file is reached?
A) while (inputFile.nextLine == " ")
{ ) .. }
B) while (inputFile != null)
{ ) .. }
C) while (!inputFile.EOF)
{ ) .. }
D) while (inputFile.hasNext() )
{ ) .. }
Correct Answer:

Verified
Correct Answer:
Verified
Q42: A file must always be opened before
Q43: What will be the value of x
Q44: What will be the value of x
Q45: When you pass the name of a
Q46: Which is a control structure that causes
Q48: A loop that executes as long as
Q49: What will be the value of x
Q50: When the continue statement is encountered in
Q51: When working with the PrintWriter class, which
Q52: The _ loop allows the user to