Regarding volatile variable
<p>I was reading threads , in which I came to know that each thread has its own stack space and they share the heap.</p>

<p>What does <strong>volatile</strong> mean here in the context of thread, can some body show in terms of code  , the practical usage of threads?</p>
