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
Q62: Which of the following statements is correct
Q91: When will the loop in the following
Q92: What is the outcome of the following
Q93: What is the sentinel value in the
Q95: What is the last output line of
Q97: When designing storyboards, it is a good
Q98: What is the output of this code
Q99: What will be the output of the
Q100: What does the following code snippet display?
Q101: In the following code snippet, when does
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents