Multiple Choice
Insert the missing code in the following code fragment. This fragment is intended to read floating-point numbers from a text file. Scanner in = new Scanner(. . .) ;
While (____________)
{
Double hoursWorked = in.nextDouble() ;
System.out.println(hoursWorked) ;
}
A) in.getNextDouble()
B) in.peek()
C) in.hasNextDouble()
D) in.readNextWord()
Correct Answer:

Verified
Correct Answer:
Verified
Q58: Under which condition will the PrintWriter constructor
Q59: Which of the following patterns should be
Q60: Consider the following code snippet. PrintWriter outFile
Q61: Complete the code fragment below, which is
Q63: Select an appropriate expression to complete the
Q64: Select an expression to complete the program
Q65: You have opened a command prompt window
Q66: Your program wishes to open a file
Q66: Which of the following statements about reading
Q67: Which of the following objects should be