Next:
Introduction
Up:
Day 2: The Java
Previous:
Methods
Contents
Extending Classes
Subsections
Introduction
Objectives
An extended class
A simple example
What protected really means
Constructors in extended classes
Constructor order dependencies
Constructor phases
Constructor phase example
Overriding methods, hiding fields, and nested classes
Overriding
The
super
keyword
Marking methods and classes
final
The
object
class
Object's utility methods
Anonymous classes
Abstract Classes and methods
Cloning objects
Three major considerations in writing a clone method
Four different attitudes a class can have towards clone
Extending classes: how and when
Designing a class to be extended
Bad effects of public fields
Non-final classes have two interfaces
Next:
Introduction
Up:
Day 2: The Java
Previous:
Methods
Contents