Variable is a name of the memory location.
int var = 5;
Here var is the variable. It stores the assigned value 5 in its memory location.
What are Local Variables ?
A variable that is declared inside the method is called as Local Variable.
What are Instance Variables ?
A variable that is declared inside the Class but outside the methods is called as Instance Variable.
Example of Local Variable and Instance Variable
int var1 = 5; // Instance variable (Declared inside the Class One but is not inside any method)
int var2 = 8; //Local variable (Declared inside the method)
So, variables declared inside the methods of Class are Local Variables and inside the Class but outside the methods are Instance Variables.
Please comment below to feedback or ask questions.