What is the difference between class variable, member variable and automatic(local) variable?
The class variable is a static variable and it does not belong to any instance of class but shared across all the instances.
The member variable belongs to a particular instance of class and can be called from any method of the class.
The automatic or local variable is created on a method entry and valid within method scope and they have to be initialized explicitly.