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())
{ ... }
d. while (inputFile.hasNext())
{ ... }
Computer Science & Information Technology
You might also like to view...
The fv and type arguments for the PMT are considered optional arguments
Indicate whether the statement is true or false
Computer Science & Information Technology
If a function does not have an exception specification, then the function can thaw _______ exceptions.
Fill in the blank(s) with the appropriate word(s).
Computer Science & Information Technology