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

Can a static block throw exception?

1077


Discuss 2D arrays.

1036


How many decimal digits is 64 bit?

914


How many tetrahedral voids are there in bcc?

1072


How to compare strings in java?

983


Explain about method local inner classes or local inner classes in java?

1010


Where is jre installed?

1012


What is the importance of hashcode() and equals() methods?

1042


What is meant by data hiding/encapsulation?

1088


Write a program to find the whether a number is an Armstrong number or not?

1003


What do you meant by active and passive objects?

1060


Is stringwriter thread safe?

978


Is Java a dying language?

1062


What means public static?

1025


Is string is a class in java?

943