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
How do you convert an int to a double in java?
what is the purpose of the runtime class?
placement papaers of spring computing technology
Tell me the latest versions in java related areas?
What is generics in java interview questions?
What are the characteristics of Final,Finally and Finalize keywords.
What is the purpose of the System class?
How does multithreading take place on a computer with a single cpu in java programming?
Why we cannot override static method?
Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?
What is the use of using enum to declare a constant?
How to restrict a member of a class from inheriting by its sub classes?
What is anagram word?
Is 0 true or false in java?
What does jenkins do?