Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
Volatile is a keyword within the java programming language that specifies that a member variable associated with a class can be altered asynchronously by multiple threads. The volatile keyword in the code acts as a modifier when a member is declared. Keywords are fundamentally reserved words with a distinct meaning in the context of a compiler.
The volatile keyword is used whenever the variable signifies some sort of variable that is dependent on the environment or system, such as simple counters and clocks.