O'Reilly logo
  • Dong Yu thinks this is interesting:

If a variable is marked as volatile, every time the variable is used it must be read from main memory. Similarly, every time the variable is written, the value must be stored in main memory.

From

Cover of Java Threads, 3rd Edition

Note

the characteristics of volatile varabile