Why does this go into an infinite loop?
I have the following code: public class Tests { public static void main(String[] args) throws Exception { int x = 0; while(x<3) { x = x++; System.out.println(x); } } } We know he should have writen just x++ or x=x+1, but on x = x++ it should first attribute x to itself, and later increment … Read more