Super Keyword In Java
Super Keyword ?
The super keyword is used to access a member of the super class from the subclass. Super can only be used within a derived class constructor method. super keyword has two general froms:
(i) Calls the superclass constructor and
(ii) Accessing a member of the super class that has been hidden by a member of subclass.
➦A subclass can call a constructor method defined by its superclass by using the super keyword. Whenever you create the instance of subclass, an instance of parent class is created implicitly which is referred by super reference variable.
➦The keyword “super” came into the picture with the concept of Inheritance.
Animals can not speak Dogs can be dangerous
This is student class This is person class