super() can be used to invoke immediate parent class constructor .
Read moreWhat is a superclass in Java?
In Java, the superclass, also known as the parent class , is the class from which a child class (or a subclass) inherits its constructors, methods, and attributes . For instance, in our above example, BankAccount was the superclass from which our subclass SavingsAccount inherited its values.
Read moreWhat is a superclass in Java?
In Java, the superclass, also known as the parent class , is the class from which a child class (or a subclass) inherits its constructors, methods, and attributes . For instance, in our above example, BankAccount was the superclass from which our subclass SavingsAccount inherited its values.
Read moreWhat is the purpose of using super constructor?
Definition and Usage The super keyword is used to call the constructor of its parent class to access the parent’s properties and methods . Tip: To understand the “inheritance” concept (parent and child classes) better, read our JavaScript Classes Tutorial.
Read more