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 is gc()?
Whats the difference between notify() and notifyall()?
Is a copy constructor?
Add a value x to array from index l to r where 0 <= l <= r <= n-1
What are computer functions?
What is a singleton factory?
What are the basic control structures?
What are the advantages of java?
Can an interface be defined inside a class?
Which category the java thread do fall in?
What is unicode with example?
what is ststic with example
What happens if an exception is throws from an object's destructor?
is there a separate stack for each thread in java? : Java thread
What's the difference between int and integer in java?