Question: what is difference between static and nonstatic variables in java?
Answer: A static variable acts as a global variable and is shared among all the objects of the class. A non-static variables are specific to instance object in which they are created.