Next: Classes: Access Modifiers
Up: Java Notes
Previous: Class: Methods Implementation (contd.)
- Instance Variable of Class Type references the instance object
- Use of
new
and constructor
- Access Labels
- Each instance variable (member variable of class) will have a copy of it in each instance object
- Each instance method (member method of class, for each implementation) is shared by all its instance objects
- Each class variable (
static
member variable) will have a copy of it shared by all its instance objects
- Each class method (
static
member method) can operate only on class variables (not on instance variables).
- class members accessed may be accessed without instantiation, using class name instead of an instance name.
-
final
- Example
Ananda Amatya
9/15/1999