Help the world stop coronavirus! Stay home!

Prev Next

Java / volatile

How compiler and runtime treats a volatile variable?

Volatile variable means it is shared so the operations on it should not be reordered with other memory operations.

These variables are not to be cached in registers or in other caches so that a read on volatile Caroline always fetch the most recent write by any thread.

❤Cash Back At Stores you Love !!!❤

Earn your $10 reward when you make your first purchase through Ebates by signing up with clicking below button.

Ebates Coupons and Cash Back

More Related questions...

Show more question and Answers...

Java ThreadLocal

Comments & Discussions