Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is dynamic method dispatch ?

Answer Posted / hasib reza

Determining at runtime, which overridden method to call, is called dynamic method dispatch.
 This is how Java implements run-time polymorphism.
Whenever a method is called on an object reference,
 Declared type of object reference is checked at compile time to make sure the method exists in declared class.
At run time, the super class objects reference could refer to an instance of any subclass of the declared reference type.
When an overridden method is called through a super class reference,
 Java determines which version of that method to execute based upon the type of object being referred.
When different types of objects are referred to,
 Different versions of an overridden method will be called.
It is the type of the object being referred to
 Not the type of the reference variable

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does it mean that strings are immutable?

1114


Is binary a low level language?

902


Tell me about different OOPS concepts.

988


Is array a class in java?

960


What are the differences between stringbuffer and stringbuilder?

1042


What do you mean by light weight and heavy weight components?

1004


How to sort an array in java without using sort method?

869


Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls

1894


How to Sort Strings which are given in List and display in ascending order without using java api.

4413


What is final keyword in java? Give an example.

1000


What is a priority queue java?

974


How many types of keywords are there?

977


Objects or references which of them gets garbage collected?

955


What is unicode full form?

961


What is comparator in java?

988