DEV Community

pranavinu
pranavinu

Posted on

INSTANCE VARIABLE

Instance variable:
1)Instance variable that belongs to the object of the class
2)Declaration-it declares the variable inside the class and not a outside
of the method()
3)Assign-with an object,the values were assign to the variable
Ex:objectname.variable=value;
4)The instance variable belongs to an object,heap memory will provide a
space for an object

Top comments (0)