Q8
What does the `volatile` keyword in Java do?
A.
Marks a variable as immutable
B.
Allows multiple threads to access a variable simultaneously
C.
Defines a constant variable
D.
Ensures that a variable is always read from main memory
AnswerAnswer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board