What is the purpose of the overriden method and when we can use the override method?
In OOP, method overriding can understand as a subclass can provide specific implementation of a method and that method already provide the implementation by parent class.
The condions of method overriding
- Two methods have to have the same name, the same return data type and data type of parameter
- It’s can not be final method or static method