While reading Concurrency in practice I read that:
NoVisibility demonstrated one of the ways that insufficiently synchronized programs can c
NoVisibility
It's not Java specific issue. Processors have caches. Without synchronization processor 1 can read a value into its cache from memory, modify it in its cache but never flush it, then processor 2 reads stale value from memory