![]() |
![]() |
![]() |
![]() |
![]() |
|
In Segment 295 and Segment 300, you learned that you can
use this and super in a constructor, without field
selection operators and method names, to call constructors. When so used,
the this or super call must be the first call in the
constructor. When super is used, the constructor called is the one
defined in the direct superclass.
In this chapter, you learned that you can use this and super
in methods, with field selection operators and method names, to call
methods. Such calls can appear anywhere. When super is used, the
method called is the first one encountered in the subclasssuperclass chain.