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.
Java
Java Quiz
Start Quiz

or Read more about Java Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback