why does overriding is run time polymorphism and overloading is compile-time polymorphism ?

8/26/2016 11:12:05 PM

Moamen Adel

1 Answer

New Answer


Overloading is compile time couse the signature of the method can be determined; however Overriding depends on the type of reference wich can be determined at run time not at the compilation time. A method with a parent class parameter will not know the right override method of parent's subclasses to call till run time.