Thursday, 17 July 2014

Explicitly call super constructor in sub constructor

The following code is OK:
sub-constructor-with-parameter
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