What is the purpose of the super keyword in Java ?

2025

What is the purpose of the super keyword in Java ?

  1. A.

    It refers to the current instance of the class

  2. B.

    It refers to the superclass (parent class)

  3. C.

    It refers to a static method

  4. D.

    It refers to an object of the same class

Attempted by 60 students.

Show answer & explanation

Correct answer: B

The super keyword in Java is used to refer to the immediate parent class instance. It allows access to parent class methods and constructors that may be overridden or hidden in the child class.

Explore the full course: Tpsc Assistant Technical Officer