# volatile Java Keyword

The volatile keyword may be used to indicate a member variable that may be modified asynchronously by more than one thread.

Note: the volatile keyword is not implemented in many Java Virtual Machines.

## Examples

      public class MyClass
      {
         volatile int sharedValue;
      }

## Remarks

- volatile is intended to guarantee that all threads see the same value of the specified variable.

Related Topics

None.