Interview Q&A / Object-Oriented Programming

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What are the uses of the super keyword?

SHORT ANSWER

super refers to the parent part of the current object. It calls the parent constructor, calls a parent method that the child has overridden, or reaches a parent field hidden by a child field.

Explain it simply

A child can say "my own style" or "as my parent does it". this points to the child's version. super points to the parent's version, which is useful when you want to extend behaviour rather than replace it.

Example

java
class Employee {
    String name;
    Employee(String name) { this.name = name; }
    double bonus() { return 5000; }
}

class Manager extends Employee {
    Manager(String name) {
        super(name);                       // parent constructor, must be first line
    }
    @Override
    double bonus() {
        return super.bonus() + 10000;      // parent's logic plus extra
    }
}

System.out.println(new Manager("Kavya").bonus());   // prints: 15000.0

super(...) and this(...) cannot both appear in one constructor, because each must be the first statement.

What to say in the interview

"super gives access to the parent class's members. I use super(...) to run the parent constructor, super.method() to reuse and extend overridden behaviour, and super.field when a child field hides a parent field."

Common mistakes

  • Calling super(...) after other statements in the constructor.

#java#super#inheritance

Related questions

Practise more Object-Oriented Programming questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Object-Oriented Programming quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.