Java Reference
In-Depth Information
3 . How do you prevent a subclass from having access to a member of a superclass?
To prevent a subclass from having access to a superclass member, declare that mem-
ber as private .
4 . Describe the purpose and use of the two versions of super described in this chapter.
The super keyword has two forms. The first is used to call a superclass constructor.
The general form of this usage is
super ( param-list );
The second form of super is used to access a superclass member. It has this general
form:
super. member
5 . Given the following hierarchy, in what order do the constructors for these classes
complete their execution when a Gamma object is instantiated?
Search WWH ::




Custom Search