In short it is because of strict type checking in Java. In Java conditional statement expects only boolean inside them and as x-- can be any integer which will not be boolean that is why it is not allowed in Java.
Correct usage would be while(x-- > 0) instead while(x--)
while(x-- > 0)
while(x--)
while(i<10); { i++; printf("%d,\n", i); }
Loop does not run for 10 iterations, what is the error?
In Java I am using statement a += b where a is int and b is double, when I use a += b, it won't give error but in case of a = a + b it gives error, why ?
While compiling step by step if we don't include -o while generating 1.i it will not create a new file and write the output on stdout, but in case of generating 1.s/1.o if we don't write -o it is automatically creates a new file and writes data into it. Why?