Single Choice Easy

QWhat is the purpose of the "super" keyword in Java?

ID: #10344 Abstract class and method 165 views
Question Info
#10344Q ID
EasyDifficulty
Abstract class and methodTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A The "super" keyword is used to refer to the immediate subclass of a class.
  • B The "super" keyword is used to invoke the superclass constructor or method.
  • C The "super" keyword is used to specify a superclass in a multiple inheritance scenario.
  • D The "super" keyword is used to define static variables in a class.
Correct Answer

Explanation

The "super" keyword is used to invoke the superclass constructor or method in Java. It is used to access the members of the superclass that have been hidden by a subclass. It is also used to refer to the immediate superclass of a class.

Share This Question

Challenge a friend or share with your study group.