title: What does "volatile" mean in Java?
body: <p>We use <code>volatile</code> in one of our projects to maintain the same copy of variable accessed by different threads. My question is whether it is alright to use <code>volatile</code> with <code>static</code>. The compiler does not give any errors but I don't understand the reason of using both.</p>