dcsimg

What is the difference between volatile and synchronized?

Davanum Srinivas

There's an excellent article at developerworks on when to use which of these keywords Use synchronized or volatile when accessing shared variables.