Examveda
Examveda

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

Answer: Option D


This Question Belongs to Java Program >> Miscellaneous In Java

Join The Discussion

Related Questions on Miscellaneous in Java