Question: what is the difference between instance variable and class variable?
Answer: What is the difference between class variables and instance variables in Java? ... Instance variables are declared in a class, but outside a method, constructor or any block. Class variables also known as static variables are declared with the static keyword in a class, but outside a method, constructor or a block.