f="../index.html"><img src=../../images/javaHeader.gif width=26 height=26 align=bottom border=0 alt="Writing Java Programs | "></a>
</td>
<td align=right>
<a href="index.html"><strong><em>Java Objects</em></strong></a>
</td>
</tr>
</table>
<p>
<hr size=4>

<h2>
    Declaring a Volatile Variable
</h2>
<p>
<blockquote>

When you are using threads that can modify the same variable, you can use
Java's <code>volatile</code> keyword to indicate that to the Java runtime
system. At this time, the Java runtime syste