HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Java Keywords : Using super to call the superclass of Dog (subclass)
The super
keyword refers to superclass
(parent) objects.
It is used to call superclass methods, and to access the superclass constructor.
The most common use of the super
keyword is to eliminate
the confusion between superclasses and subclasses that have methods with the
same name.
To understand the super
keyword, you should have a basic understanding of Inheritance and Polymorphism.
Read more about inheritance (subclasses and superclasses) in our Java Inheritance Tutorial.
Read more about polymorphism in our Java Polymorphism Tutorial.