posted 13 years ago
above code compiles fine.
we know if we are invoking the subclass overloaded constructor,then super-class no arg constructor will be
invoked first, and if super-class no arg constructor is not there, then it will be a compiler error.
if we commented out line2 ,we have to defined superclass no arg constructor(i.e. uncommented out line 1), othervise it
gives a compiler error,what is the logic behind it?
why we don't need no arg. super-class constructor(default) here ,as we are instantiating subclass object(with arg.)?