Inheritance
The inheritance is useful for code reusability purposes as it extends existing properties and methods of a class. The extends
keyword is used to create a class inheritance.
The super
method is used inside a constructor and refers to the parent class. With this, one can access the parent class properties and methods.
Last updated
Was this helpful?