
In the previous post, talked about how many elements of a java class & local variable. Now we learn about Instance variable.
2. Instance Variable
Declaration:- The variables which are declared inside the class but outside of the method that are called instance variable.
Scope:- The variable can access inside the class. All methods, constructors and blocks of the class also able to access the variables.
Memory Allocation:- Memory is allocated in object...