Dynamic Method Dispatch is the mechanism in which call to an overridden method is resolved at run time rather than at compile time. Dynamic Method Dispatch is related to a principle that states that an super class reference can store the reference of subclass object. However, it can't call any of the newly added methods by the subclass but a call to an overridden methods results in calling a method of that object whose reference is stored in the super class reference. It simply means that which method would be executed, simply depends on the object reference stored in super class object.
Showing posts with label Polymorphism. Show all posts
Showing posts with label Polymorphism. Show all posts
Subscribe to:
Posts (Atom)