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 / deepti sharma

Dynamic method dispatch or run time polymorphism is a property by which methods to be called are resolved at runtime.First create super class reference variable in its subclass and an object of both super and sub class and then assign the sub class object to its super class reference variable.
For ex: Class A{
void add();}
Class B extends A{
void add();}
Class C{
p.s.v.m(String args[]){
A a=new A();
B b=new C();
A r;
r=b;
r.add();//call Class B's add method
}}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an array length?

961


What is a variable and constant?

1059


Why is java logo a cup of coffee?

1254


Explain the difference between string, stringbuffer and stringbuilder in java?

1055


What is the applet security manager, and what does it provide?

1045


What is the difference between numeric and integer?

1059


What is the difference between reader/writer and inputstream/output stream?

1133


What does void * mean?

1109


What is string literal in java?

1099


Does chrome use java?

1023


What is a cup of java?

1061


What is difference between null and void?

1016


What are the advantages of encapsulation in java?

1051


What is meant by memory leak?

1153


What is void in java?

1144