GeeCON Prague 2014*
The moose likes Java in General and the fly likes Volatile versus Synchronized in Java 5 and Later Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Volatile versus Synchronized in Java 5 and Later" Watch "Volatile versus Synchronized in Java 5 and Later" New topic
Author

Volatile versus Synchronized in Java 5 and Later

Natalie Kopple
Ranch Hand

Joined: May 06, 2003
Posts: 325
Please help me to understand this:

In Java 5 and later version, when we would use the volatile keyword and why is it different than using synchronized?

Thank you.
Siddhesh Deodhar
Ranch Hand

Joined: Mar 05, 2009
Posts: 118
This link will help you .


Good, Better, Best, Don't take rest until, Good becomes Better, and Better becomes Best.
Sidd : (SCJP 6 [90%] )
Natalie Kopple
Ranch Hand

Joined: May 06, 2003
Posts: 325
Thanks very much for the link. Everything is well explained.
 
GeeCON Prague 2014
 
subject: Volatile versus Synchronized in Java 5 and Later