Domanda di colloquio di European Commission

What is the purpose of the volatile Java modifier?

Risposta di colloquio

Anonimo

28 feb 2021

It tells the JVM a given variable marked as such must have its own copy of it for every thread running that code.