1.
Q1: Given the following code segment:
int x = 1;
while ( /* condition */ ) {
if (x % 2 == 0) {
System.out.print(x + " ");
}
x = x + 2;
}
Consider the following conditions to replace
/* condition */
in the code segment:- x < 0
- x <= 1
- x < 10
For which of the conditions will nothing be printed?
- I only
- II only
- I and II only
- I and III only
- I, II and III