What is the result of the following program?

int x = 12;
while (x < 10) {
    x--;
}
System.out.print(x);
Explanation
Since the loop condition is not valid the value "x" won't change.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes