Java - Variable
Variables are the container to hold the value while Java program executed.
Variable is the name of the memory location.
Types:
Variable is the name of the memory location.
Types:
- Local Variable
When we are creating the variable inside the method that is called local variable.
- Instance Variable
When we are creating the variable inside the class but outside the method that is called Instance variable.
- Static Variable
When we are creating the variable with static keyword then it is called Static variable.
Comments
Post a Comment