Volatile keyword is used to indicate the threads using a common variable that, the variable which is declared as Volatile can be updated by multiple threads. So threads should not cache the threads locally and in turn should get the value for the variable from main memory.
If a variable is declared as volatile, it won't be serialized.
Liked By
Write Answer
What is volatile Keywords in Java ?
Join MindStick Community
You have need login or register for voting of answers or question.
Anonymous User
04-Jul-2015