What are volatile variables?
Volatile variables may change its value unexpectedly in the program.
The program will check its value every time, it tries to use it.
If a variable is not volatile, the program may keep a copy of the var in its cache.
Volatile variables may change its value unexpectedly in the program.
The program will check its value every time, it tries to use it.
If a variable is not volatile, the program may keep a copy of the var in its cache.
Comments