Explain me when do you use volatile variables?

Submitted by: Muhammad
When a member variable is accessed by multiple threads and want the value of a volatile field to be visible to all readers (other threads in particular) after a write operation completes on it.
Submitted by: Muhammad

Read Online Java Software Engineer Job Interview Questions And Answers