Reason: In Java, we can modify the values of a variable with the help of a reserved keyword known as volatile. It is a different way of making a class thread-safe. Thread-safe means that the methods and objects of a class are accessible by multiple threads at the same time.
The volatile keyword is not a replacement of a synchronized block or method as it does not remove the need for synchronization among the atomic actions.
Global is not a reserved keyword in Java. The transient and default are keywords in Java, but they are not used for accessing a variable by a thread from any part of the program.