This question is from SCJP
int x = 0;
int y = 10;
do {
y--;
++x;
} while (x < 5);
System.out.print(x + "," + y);
What is the result?
A. 5,6
B. 5,5
C. 6,5
D. 6,6
ANSWER is B
but i was wondering why its not A. because we know that after the post-decrement(y--) the value remains same as before the decrement i.e 6. Please provide a reason
Thanks in advance