hi all,
what the specific requiremnets when we should go for static poly, and when dynamic polymorphism.
in my opinion ,
AS we all know that the static polymorphism means overloading and we use it when we want that it should two methods with same name and different signature.
and dynamic polymorphism means overriding so when we want some functionality need to be implemeted separately by diferent class according to the requirement then we go for it ..
i want some more opinions and please be specific ..
thanks
Loading
sherlock holmesPosted Aug 11, 2014, 7:50 AM
Mahesh ChandPosted Sep 10, 2010, 9:26 AM
See Our Recommended Articles in the right hand side with more samples and details.
Koteswararao MallisettiPosted Sep 10, 2010, 9:22 AM
suppose shape is super class
in that we define area() as one method with it perform some task form this shape
we derived 2 classes that are rectangle and triangle with out override that area method
that result is wast in this situation we must override the parent area() method why because the both formulas for area is different....