0
Why the answer of this question is 150?
What is the output of this code? int x = 100; int y = 200; while (++x < --y) { }; System.out.print(x);
3 odpowiedzi
0
So suppose x and y are at 149 and 151 now, so
when x will reach 150 y will be 151 which is true and then y also becomes 150 and x value 150 is printed
0
Ok, thanks understandable