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
What are heterogeneous objects?
Why is multiple inheritance not supported in java?
Can static method access instance variables ?
What are class members by default?
What do you understand by the bean persistent property?
Which is better arraylist or vector?
What is methods in java?
Can a constructor call the constructor of parent class?
What are the advantages of arraylist over arrays?
What is the difference between the size and capacity of a vector?
What are the concepts of 'OOPS'?
What are the types of methodology?
What is a nested list?
How do I remove a character from a string in java?
What does @param args mean in java?