Chapter 10: Inheritance
Polymorphism
- In Java, method calls are always determined by the type
of the actual object, not the type of the object reference.
- Consider the toString() method and a suitable test program using
Monday's example of the following classes: person,
baseball player, pitcher and batter.
Access Control
- public
- package
- protected
- private
Object Class Methods
- String toString()
- boolean equals(Object otherObject)
- Object clone()
Lecture Code