Variables are the names of the memory locations that can store values. A variable must be declared before we can store value in it.
Java has three kind of variables:
All the three types of variables are declared in similar manner but use of class and instance variables differ from the use of local variables. There are also differences in terms of the modifiers (e.g. visibility / access modifiers), which can be used with the variables.
Java has three kind of variables:
- Local variables
- Instance variables
- Class variables
All the three types of variables are declared in similar manner but use of class and instance variables differ from the use of local variables. There are also differences in terms of the modifiers (e.g. visibility / access modifiers), which can be used with the variables.
No comments:
Post a Comment