Multiple Choice
For which input values will the following loop not correctly compute the maximum of the values? Scanner in = new Scanner (System.in) ;
Int max = 0;
While (in.hasNextInt() )
{
Int value = in.nextInt() ;
If (value > max)
{
Max = value;
}
}
A) 3 3 3 3
B) 0 1 2 9 107
C) 107 2 9 -3
D) -4 -2 -10 -7
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q60: Given the following code snippet, what should
Q61: Which statement about this code snippet is
Q62: When designing storyboards, it is a good
Q63: What for loop can be used in
Q64: When hand-tracing the loop in the code
Q66: What is the output of the following
Q67: What is the output of the code
Q68: What is the output of the following
Q69: Suppose that a program asks a user
Q70: What is the output of this code