Java method overriding:
If a child class has the same method as declared in the parent class then it is called method overriding.
Usages of method overriding:
When we need to have a specific method implementation for the child class.
It’s also called runtime polymorphism.
Rules of method overriding:
The method must have the same name as in the parent class.
The method must have same parameters.
For more details check out:…