Originally posted by M Krishnan:
... The subclass constructor SubClass(int, int), since it is not explicitly calling the super class constructor, a default no-arg constructor of the superClass will be inserted in order for it to get constructed and that's why the need for the no-arg constructor.
Just to be clear: Without an explicit call to super (or this), an implicit
call to the superClass no-args constructor will be inserted in the subclass constructor.
The compiler will add a default no-args constructor to the superClass only if no other constructors are defined. Otherwise, it is left to the programmer to write the no-args constructor.