What is volatile modifier?

[Edit]

In C, C++, and Java, the keyword "volatile" instructs the Java Virtual Machine (VM) not to assume that the value of a variable in memory isn't changing, even during code that isn't apparently changing the value of the variable. This prevents certain optimizations from happening (for example, using a register to temporarily replace the variable).

Improve Answer Discuss the question "What is volatile modifier?" Watch Question

First answer by Avir. Last edit by Avir. Contributor trust: 64 [recommend contributor]. Question popularity: 9 [recommend question]

Research your answer:

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Programming > What is volatile modifier?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
What is volatile C?  Anything about modifier?  When should the volatile modifier be used?  Volatile modifier can be serialized- True or false?