Question
Which of the following best describes the control flow
when a method in a subclass overrides a method in its superclass, and an object of the subclass is referred to by a superclass reference, then the overridden method is called?ΒSolution
This is a core concept of polymorphism in OOP. When an overridden method is called on an object referenced by a superclass type, the actual method executed is determined at runtime based on the actual type of the object, not the reference type. This is known as dynamic method dispatch or runtime polymorphism.
More IT DBMS Questions
- Which letter-cluster will replace the question mark (?) in the following series?
NPQR, OORQ, PNSP, ____, RLUN - Which letter and number cluster will replace the question mark (?) to complete the given series?
LT6, KU12, IW24, FZ48, ____ - Select the number from among the given options that can replace the question mark (?) in the following series.
17, 18, 22, 31, 47, ___ - Which letter-cluster will replace the question mark (?) in the following series?
RGV, UME, ?, AYW, DEF - A series is given with one term missing. Choose the correct alternatives from the given ones that will complete the series.
57, 59, 56, 61, 54, ___