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.
21, 37, 73, 137, ?, 381
2Â Â Â Â Â 3Â Â Â Â Â Â 5 Â Â Â Â Â Â 9Â Â Â Â Â Â ? Â Â Â Â Â Â 33
...65, 90, 140, ?, 315, 440
257, 399, 566, ?, 983, 1237Â
In each of the following number series, one term is missing. Find the missing term.
4, 9, 16, 25, 36, ?
18, 34, 70, 134, ?, 378
23, 39, 64, 100, ?, 213
- What will come in place of the question mark (?) in the following series?
-5, -2, ?, 10, 19, 30 What should come in place of (?) question mark in the following number series.
4, 9, 19, 34, 54, ?
12, 24, 46, 78, 120, ?