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
Q111: Assume the following variable has been declared
Q112: What is the output of this code
Q113: What is the outcome of the following
Q114: What is the output of the code
Q115: What are the values of i and
Q117: Which of the following conditions can be
Q118: What will be the final output of
Q119: Which of the following loop(s) should be
Q120: How many times will the output line
Q121: What is the output of the code