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 / md arifulla

dynamic dispatch is nothing but run time polymorphism ,
for example if we take a reference variable of super class
and the abject of sub class is assigned to the reference of
super class
ex:
class A
{
print()
{
System.out.println("class A");
}
}
class B extends A
{
print()
{
System.out.println("class B");
}
}
class C{
public static void main(String srgs[])
{
A a=new A();
B b;
b=a;
a.print();//invokes the print of class A
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does variable declaration allocate memory?

986


Difference between arraylist and hashset in java?

1076


Why multiple inheritance is not supported by java?

930


Explain the pointers in Java?

996


Is integer a class?

1018


Is logger a singleton?

896


Can we call the constructor of a class more than once for an object?

1046


In java, how we can disallow serialization of variables?

939


What do you meant by active and passive objects?

1020


Can each java object keep track of all the threads that want to exclusively access it?

910


What is main method?

997


Who developed java?

940


What is the purpose of finalization in java programming?

987


What is pangram in java?

966


what is a green thread? : Java thread

956