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's the access scope of protected access specifier?

988


How will you calculate the depth of a binary tree if the tree contains 15 nodes?

1032


What are the types of inner classes (non-static nested class) used in java?

1010


Difference between notify() method and notifyall() method in java?

914


How do you ensure that n threads can access n resources without deadlock?

1257


How do you make a thread in java?

1028


In which order the iterator iterates over collection?

945


Can we serialize arraylist in java?

958


What is a Transient Object?

1020


Can java list be null?

943


os is developed in c no java is more secured then c na why dont the os developed is developed using java

4132


What is OOP's Terms with explanation?

1122


Explain java code for recursive solution's base case?

971


What is method in java with example?

900


How do you sort a string in java?

902