Lecture 15
9
Where is the method?
•
•Send aMessage to an object of class SomeClass
•Java looks in SomeClass for method matching aMessage with the right signature
•If not found, looks in parent class of SomeClass (there always is a parent, except for class Object)
•If child and parent both have the method
–child’s method overrides parent’s
–if you really want the parent’s method, use super