Dynamic Method Dispatch in Java
This mechanism known as method overriding and it’s one of the way that supports Runtime Polymorphism.
This features worked on run time and the behaviour of this work as overridden method i.e. if any class extended and both have same method then each class giving definition based on functionality and this will be identified at run time. Parent class reference variable can refer to a child class object this is also known as up-casting.