Introduction to OOP | Chapter 12: Implications of substitution: | next | previous | audio | real | text |
class Object { public boolean equals (Object right) { ... } } class PlayingCard extends Object { public boolean equals (Object right) { ... // right must be object even if we are only ... // interested in comparing cards to cards } }