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
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
What is java argument list?
What is lexicographically smallest string?
What does nextint () do in java?
What is bubble sort in java?
How we can run a jar file through command prompt in java?
How can you write a loop indefinitely in java programming?
Explain the difference between static and dynamic binding in java?
What is core java used for?
Can we declare an array without size in java?
Which variables are stored in heap?
What value is a variable of the string type automatically initialized?
How to find the given number is a prime number or not by getting input from the user
How to find the index of the largest number in an arraylist java?
What does jre stand for?