what is dynamic method dispatch ?

Answer Posted / yayati pavan kumar

Ex:
class A
{
public void m1()
{}
}
class B extends A
{
public void m1()
{
}
main()
{
A a=new B();//B reference will be assign at run time
a.m1();//class B method m1() will be called at runtime
}
}

Is This Answer Correct ?    80 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a ?

743


What is java reflection?

527


What are byte codes?

645


how to prepare for IT Officers Interview in Banks

1496


How is a structure different from array ?

569






Explain the meaning of java applet.

595


Why is multiple inheritance not supported in java?

550


Why are lists ordered in java?

533


Can you explain the cs option of java interpreter?

497


how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)

1895


What is a void method?

507


What is object cloning in Java?

625


What do you know about the garbate collector?

590


How do you replace a string in java?

535


Difference between stack and queue?

581