On almost all modern machines, the post fix increment operator is, on the machine language level, implemented as an atomic operation.
So if the machine is a single processor machine, I don't believe synchonization would be needed in case it is just a
word size primitive that is being incremented. The underlying hardware guarantees that operations on the primitive would be atomic.
If a multicore processor is being used, more complex memory consistency issues may come into play and probably lead to unpredictable results.
Of course, one doesn't ever want to depend on the underlying hardware when programming with
Java. So the correct way is, like you already know, to use synchronization when modifying the shared variable.