The following code is OK:
The Sub constructor explicitly call the super constructor with parameter. The super constructor is defined, and good to invoke.
4. The Rule
In brief, the rules is: sub class constructor has to invoke super class instructor, either explicitly by programmer or implicitly by compiler. For either way, the invoked super constructor has to be defined.
No comments:
Post a Comment