Multiple Choice
Insert a statement that will correctly terminate this loop when the end of input is reached.
Boolean done = false;
While (!done)
{
String input = in.next() ;
If (input.equalsIgnoreCase("Q") )
{
__________
}
Else
{
Double x = Double.parseDouble(input) ;
Data.add(x) ;
}
}
A) stop;
B) done = 1;
C) exit;
D) done = true;
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q3: When will the loop in the following
Q4: Which code snippet produces the sum of
Q10: Choose the loop that is equivalent to
Q10: What is the output of this code
Q32: What is the output of the following
Q59: What is the output of the following
Q67: What is the output of the code
Q84: What is the last output line of
Q95: In the following code snippet, when does
Q127: Which of the following loops executes exactly