Hi,
One of the areas where volatile variables could be used is in multi-threaded programs. In these kind of programs two or more threads share the same instance variable. For efficiency purposes each
thread can have its own copy of the variable. The master copy of variable is updated at various times. Now if u want the master variable to always reflect the current exact state of the master variable declare it as volatile. Hope it helps.
------------------