In Java, the super
keyword is used by a subclass to directly access members (fields, methods, and constructors) of its immediate superclass. This is particularly useful when the subclass has overridden methods from the superclass and still needs to call the superclass's version of the method, or to pass arguments to the superclass constructor.
Explanation:
-
upper
: This is not a keyword in Java.
-
super
: Correct answer. It is used to refer to members of the superclass from within a subclass.
-
this
: This keyword refers to the current instance of the class, not the superclass.
-
none of the mentioned
: This is incorrect, as super
is the correct answer.