Class variables are named as static variables. There is only single occurrence of a class variable per JVM per class loader. When a class is operated the class variables are initialized.
Instance variables are non-static and there is single occurrence of an instance variable in each and every class instance. A static variable is used in the singleton pattern. A static variable is used with a final keyword to define constants.