Next: Inheritance: Overriding
Up: Java Notes
Previous: Classes: This 1
-
extends
- Superclass (base class, ancestor class, ascendant class,..)
- Subclass (derived class, descendant class,..)
- Subclass instance can call superclass method
- Members inherited: public or protected, not package (NOT constructors: not class members)
- Methods Overriding: access equal or more
- Assigning a subclass object to a superclass instance
- Variable shadowing (hiding, both exist, NOT overriding)
- Accessing shadowed member variable:
super.vName
- Finalizers: must provide explicit superclass invocation for garbage collection
-
final
class: cannot be extended
-
Object
class inherited methods
Ananda Amatya
9/15/1999