Variable : is name of reserved area allocated in memory. for ex. int data=50; // here data is variable
Types of Variable :
- Local variable
- Instance variable
- Static variable
Local variable : declared inside the method .
Instance variable : declared inside the class but outside the method.
Static variable : declared as static and it can’t be local.