![img](http://www.javamex.com/RightArrowBlue.gif) [Synchronized vs volatile](http://www.javamex.com/tutorials/synchronization_volatile.shtml#synchronized_volatile ...
If you need to control access to certain pieces of data in a class when writing multithreaded applications, see how you can use the volatile keyword to get a similar effect as using the synchronized ...
// 1. volatile variables can't be put inside functions. // 2. if a volatile variable is passed to a function, it no longer remains volatile. To pass a volatile variable // pass its owning class object ...