DEV Community

Ratik Mahajan
Ratik Mahajan

Posted on

Volatile keyword in Java

- 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.

Top comments (0)