What is the super keyword?

Asked 07-Dec-2019
Viewed 582 times

1 Answer


Super is a keyword in Java generally used in the context of inheritance. The super keyword in Java is a reference keyword that is used to refer parent class objects. It is used with variables, methods and constructors. It is used with variables to access the base class variables having same name as  that of the derived class. In the context of methods, it is used to access the base class functions or methods having same name as the derived class. It is also used to call the parent or base class constructor. It helps in resolving ambiguity between variables, methods and constructors having same name in both base and derived class.