DEVFYI - Developer Resource - FYI

The superclass constructor runs before the subclass constructor ...

Java Interview Questions and Answers (part 3)


(Continued from previous question...)

402. The superclass constructor runs before the subclass constructor ...

The superclass constructor runs before the subclass constructor. The subclass's version of the overridable method will be invoked before the subclass's constructor has been invoked. If the subclass's overridable method depends on the proper initialization of the subclass (through the subclass constructor), the method will most likely fail. Is that true?


Yes. It is true

(Continued on next question...)

Other Interview Questions