PPT Slide
Variables (e.g. strNoise):
- Java first examines current method, looks for local variable or parameter;
- Java then examines current class (e.g. Dog);
- Java then examines superclass (e.g. Animal);
- Java continues up the class hierarchy until no more superclasses to examine.
Methods (e.g. doYourThing() or identifySelf()):
- Java first examines current class;
- Java then examines superclass;
- Java continues up inheritance
hierarchy until no more superclasses to examine.