what is dynamic method dispatch ?
Answer Posted / ramya
Dynamic method dispatch is the process the Java runtime
system uses to determine which method implementation to call
in an inheritance hierarchy. For example, the Object class
has a toString() method that all subclasses inherit, but the
String class overrides this method to return its string
content. If a String or other object type is assigned to an
Object reference using application logic, the Java compiler
cannot know in advance where a call to the toString() method
will be resolved, it must be determined dynamically at runtime.
| Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
How do listeners work?
What is arrays aslist in java?
What are the six ways to use this keyword?
What is a war file?
How do you reverse a word in java?
How will you initialize an Applet?
Is hashmap thread safe?
What is the access scope of protected access specifier?
What is the synonym of framework?
What are the steps in the jdbc connection?
Can we sort array in java?
What are the advantages of autoboxing?
Explain about collection interface in java?
Is null an object java?
What is natural ordering in java?