Examveda

In Java, what is the purpose of the "super" keyword in a constructor?

A. To call the superclass constructor

B. To create a new object

C. To access a static method

D. To indicate a private method

Answer: Option A


This Question Belongs to Java Program >> Constructors And Methods

Join The Discussion

Comments (1)

  1. Manish J
    Manish J:
    2 years ago

    Super is used to call immediate invoking parent , writing super is mandatory else compiler assigns non parameterized super.

Related Questions on Constructors and Methods

What is a constructor in Java?

A. A special method to create instances of classes

B. A method used for mathematical calculations

C. A method to perform string manipulations

D. An exception handling mechanism