Styrow.dev
Question 155 of 247
Java Topic: General medium

What is the use of Volatile Keyword?

Question

What is the use of Volatile Keyword?

Answer

Volatile is a declaration that a variable can be accessed by multiple threads and hence shouldn’t be cached.