Solved

Insert a Statement That Will Correctly Terminate This Loop When

Question 2

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:

verifed

Verified

Related Questions