InterviewSolution
| 1. |
What Is Significance Of Using Volatile Keyword? |
|
Answer» Java allows threads to access shared variables. As a RULE, to ensure that shared variables are consistently UPDATED, a thread should ensure that it has exclusive use of such variables by obtaining a lock that enforces mutual EXCLUSION for those shared variables.
Java allows threads to access shared variables. As a rule, to ensure that shared variables are consistently updated, a thread should ensure that it has exclusive use of such variables by obtaining a lock that enforces mutual exclusion for those shared variables.
|
|