loonytek.com
Volatile vs Synchronized
In this post, I will talk about usage of volatile fields in Java and how volatile is different from synchronized. Both volatile and synchronized are used in multi-threaded programs to get some degr…