Skip to content

How Volatile in Java works ? Example of volatile keyword in Java

3
  • Anukriti Sharma
  • joshi daniel
How Volatile in Java works ? Example of volatile keyword in Java

Volatile keyword in Java is used as an indicator to Thread that do not cache value of this variable and always read it from main memory. So if you want to share any variable in which operations read and write is atomic by implementation e.g. read

Read this post on javarevisited.blogspot.com


Popular Articles by this blogger