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
Is java free for businesses?
Why declare Main() method as a static in java ?
Why there is no call by reference in java?
Can we inherit inner class?
What is difference between float and double?
What is the difference between variable & constant?
What is the difference between the ">>" and " >>>" operators in java?
What is a java object and java application?
Write a java program that prints all the values given at command-line.
Is java hard to learn?
Can we use static class instead of singleton?
Why do we need singleton?
what do you mean by classloader?
Is there is any difference between a scrollbar and a scrollpane?
How does arraylist work in java?