Minggu, 25 September 2016

How to perform dynamic method dispatch in java

In this article we will look at dynamic method dispatch in Java which is a way to provide run-time polymorphism. What is dynamic method dispatch? Dynamic method dispatch is a mechanism which resolves the call to a overridden method at run-time based on the type of object being referred. When is dynamic method dispatch possible? It is possible only when the following are satisfied: A class inherits from another class (inheritance) Super class variable refers a sub class object A overridden method is invoked using the super class reference Why dynamic method dispatch? Dynamic method dispatch is the way to

The post How to perform dynamic method dispatch in java appeared first on Coding Security.


How to perform dynamic method dispatch in java
read more

Tidak ada komentar:

Posting Komentar