A Java programming language keyword used in variable declarations that specifies that the variable is modified asynchronously by concurrently running threads.The volatile keyword is used on variables that may be modified simultaneously by other threads. This warns the compiler to fetch them fresh each time, rather than caching them in registers. This also inhibits certain optimisations that assume no other thread will change the values unexpectedly. Since other threads cannot see local variables, there is never any need to mark local variables volatile.

Virtual Machine
Use of this website constitutes acceptance of the AllAppLabs.com Terms and Conditions