Solved

In the Following Code, What Values Could Be Read into Number

Question 20

Multiple Choice

In the following code, what values could be read into number to terminate the while loop? Scanner keyboard = new Scanner(System.in) ;
System.out.print("Enter a number: ") ;
Int number = keyboard.nextInt() ;
While (number < 100 && number > 500)
{
System.out.print("Enter another number: ") ;
Number = keyboard.nextInt() ;
}


A) Numbers less than 100 or greater than 500
B) Numbers in the range 100 - 499
C) Numbers in the range 100 - 500
D) Impossible - the boolean condition can never be true

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions