Question: Explain the concept of the volatile keyword in Java.Answer: The volatile keyword ensures that a variable's value is always read and written from and to the main memory, preventing thread-local caching. |
Is it helpful?
Yes
No
Most helpful rated by users: