Possible Duplicate:
pre Decrement vs. post Decrement
What is the difference between ++i and i++?
I've just realized that
int i=0;
System.out.println(i++);
prints 0 instead of 1. I thought that i was incremented and THEN printed. It seems that the contrary happens.
Why?