Multiple choice

A manager class extends employee class. To invoke the constructor of parent class, user has to invoke …………. method.

  1. employee.super();

  2. super();

  3. manager.super();

  4. no method will require

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To invoke a parent class constructor from a child class constructor, use super() as the first statement. Option A (employee.super()) and C (manager.super()) are invalid syntax. The super() keyword alone calls the parent constructor - it's a language keyword, not a method on any object.