Example & Tutorial understanding programming in easy ways.

What is the difference between class variable, member variable and automatic(local) variable

Class variable is a static variable and does not belong to instance of class but rather shared across all the instances of class.if one class change variable then the change reflect into all classes.

Member variable belongs to a particular instance of class.

automatic or local variable declared into a method and has only method scope.

Read More →