DEV Community

Ratik Mahajan
Ratik Mahajan

Posted on

1

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)

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay