![]() |
![]() |
![]() |
![]() |
![]() |
|
The Movie class's describe method, as defined in
Segment 313, calls describe with super
as its target. That call uses the describe method defined in
the Attraction class.
In general, if you write a call to a method with a super target,
Java ignores the definition of that method in the target's class, if any;
instead, Java uses the first method with the same name defined in the
chain of classes leading upward in the class hierarchy from the target's
superclass.