What Does Volatile Variable Mean?
A volatile variable is a variable that is marked or cast with the keyword “volatile” so that it is established that the variable can be changed by some outside factor, such as the operating system or other software. A volatile variable is useful in multithreaded applications or in other situations where programmers must anticipate changes to the variable other than those that are common within the code module.
Techopedia Explains Volatile Variable
The volatile variable is useful in different programming languages, including parts of the “C suite” (C++, C, and C#) and in Java, a common programming language for the Web. The exact use of a volatile keyword or variable changes with regard to a particular programming language syntax, but generally, variables can be created as volatile, or conditionally declared volatile within code.