Question: what is difference between static and volatile in java?
Answer: Static vs Volatile in Java. Declaring a static variable in Java, means that there will be only one copy, no matter how many objects of the class are created. The variable will be accessible even with no Objects created at all. ... When a variable is volatile and not static, there will be one variable for each Object.