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
What is a “stateless” protocol ?
What is member in java?
Where import statement is used in a java program?
What is private public protected in java?
What is a boolean expression in java?
State two differences between C and Java.
Define immutable object?
Why do we need wrapper class?
Which graphs are functions?
How do you include a string in java?
When is the arraystoreexception thrown?
What is java oops?
Differences between external iteration and internal iteration?
What is the difference between preparedstatement and statement in java?
Describe method overriding