Search code examples
javascjp

SCJP - exam question


It's actually from SCJP 6 StudyGuide Exam310-065(MGH,2008) alt text http://www.freeimagehosting.net/uploads/1f37466409.png alt text http://www.freeimagehosting.net/uploads/03aaff252a.png alt text http://www.freeimagehosting.net/uploads/b56385a448.png alt text http://www.freeimagehosting.net/uploads/83761fff86.png

The call to super() in Kinder class constructor seems to be redundant because of:


The question is, if authors made some mistake in this question or am I missing something (more likely)


Solution

  • Sorry, I may be missing something (most likely), but it sounds like it's stated in the text:

    a. The line cannot be left blank, as the parentheses are already in place.

    That is, a constructor can be empty.. except that empty parentheses would be a syntax error (so it wouldn't compile).

    b. Further, since the superclass constructor called is the no-argument version, this constructor must be created.

    I think you may just have to re-read the text one more time and it should all click. Or I am really off on the whole thing.. in that case I apologize, it's kind of late over here. ;-)