Saturday, August 2, 2014

Inheritance vs. polymorphism

Polymorphism is when classes have different functionality but share the same interface, i.e. the actual implementation changes based on type and the type decides which method will be called.


Inheritance is simply when a class derives from another class and can use methods/properties that were defined in the base class.


No comments:

Post a Comment