Guys,
I read some messages in the forum which use
Dynamic
Polymorphism and Method Overriding synonymously. It is WRONG!!
Dynamic Polymorphism occurs when subclass methods are called using base class reference.
When you are not using base class reference to access overriden methods, it is Compile Time Polymorphism.
//Dynamic Polymorphism
Base b = new Derived();
b.OverridenMethod();
//Compile Time Polymorphism
Derived d = new Derived();
d.OverridenMethod();
In both the above cases, same method is called.