Delete comment from: Javarevisited
Amazing explanation! Thanks for that.
In the differences section point 5, you say that -
"synchronized synchronizes the value of all variable between thread memory and "main" memory"
Isn't this incorrect ? If it was true, then there would be no need for Volatile keyword. (Since volatile is always used in conjunction with synchronized)
May 24, 2013, 2:20:03 AM
Posted to How Volatile in Java works? Example of volatile keyword in Java