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 you convert an int to a double in java?
Can keyword be used as identifier?
Name and explain the types of ways which are used to pass arguments in any function in java.
Difference between object instantiation and construction ?
What is percentage in java?
What carriage return means?
What is the difference between yield() and sleep()?
What is derived datatype?
Define packages in java?
what is a green thread? : Java thread
Which containers use a flowlayout as their default layout in java programming?
Can we use string in switch case in java?
Which class is the superclass for all the classes?
What is method overriding in java ?
What do you know about java?