Volatile keyword in Java

Ratik Mahajan - Jul 20 '22 - - Dev Community

- What is volatile modifier in java

  1. it is not cached.
  2. it is also stored in main and not in cache.
  3. we tell JVM that this variables would used by many threads in the program. so please dont cache it. just read from the main memory.
. . . . . . . . . . . . . . . . . .
Terabox Video Player