Multiple choice

Which of the following are true regarding dynamic method dispatch? i. Dynamic method dispatch is a process in which a call to an overridden method is resolved at runtime rather than at compile time. ii. Dynamic method dispatch is a process in which a call to an overridden method is resolved at compile time rather than at runtime. iii. In Dynamic method dispatch process, a reference variable calls the overridden method of a superclass. iv. In Dynamic method dispatch process, a reference variable calls the overridden method of a subclass.

  1. i. and iv. are correct

  2. i. and iii. are correct

  3. ii. and iii. are correct

  4. ii. and iv. are correct

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The dynamic dispatch process is a process which is applicable when  a call to the overridden method is resolved at runtime rather than at compile time. This will be used as part of polymorphism concept. In the dynamic dispatch process, a reference variable calls the overridden method of the superclass but not the subclass because it doesn't know anything about subclass.