+ 1
int x = 3; while(x > 0) { System.out.println(x); x--; } /* Outputs 3 2 1 */
in this code, shouldn't the value of x remain 3 when it is compared with 0 for the 2nd time as it is post decrement.
2 Respostas
0
on line x-- , it will be 3..post that line, x becomes 2..
0
Fuck you SoloLearn