Threads are not volatile. The volatile is a keyword that is used while having multiple threads in a Java Program.
This keyword is used when multiple threads access a particular variable but still it is not mandatory to synchronize or prevent access to that variable.
volatile variable is mainly used in multithreading environment. so let me explain it from that context.In a multithreading environment,for a variable which is not marked as volatile will be stored in local cache memory for each thread. Meaning each thread will have a local copy of the variable and they dont know about what value this variable is having in another thread. If a variable is marked volatile, then the updations to this variable will happen in the main memory and not in local cache
RAM is a volatile Memory. But ROM is not volatile.
volatile will evaporate
volatile will evaporate
DRAM is a volatile memory
DRAM is a volatile memory
Non-volatile
ROM is non-volatile memory.
It is used to alert the compiler that the value of a variable may be modified by more than one thread. As a result, the Java Virtual Machine is not allowed to do certain optimizations, which are problematic in such cases.
DRAM is volatile.
The prefix of volatile is "vol-".
A substance that evaporates easily is called volatile. Volatile substances have low boiling points and readily transition from a liquid to a gas at normal temperatures.