The most important use of inheritance in Java is code reusability . The code that is present in the parent class can be directly used by the child class. Method overriding is also known as runtime polymorphism.
The most important use of inheritance in Java is code reusability . The code that is present in the parent class can be directly used by the child class. Method overriding is also known as runtime polymorphism.