WHAT IS THE DIFFERENCE BETWEEN STATIC VARIABLE AND INSTANCE VARIABLE

PARAMETER INSTANCE VARIABLE STATIC VARIABLE Access The instance variable is accessed through the object of the class. An object must be created for the class in order to access the instance variable The static variable is accessed through the class name. Object is not needed to access the variable value. Lifetime Instance variables exists till …

WHAT IS THE DIFFERENCE BETWEEN STATIC VARIABLE AND INSTANCE VARIABLE Read More »