Volatile

Volatile keyword is used on variables that may be modified simultaneously by many threads.

The next example illustrates the effects of (not) using volatile fields.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.