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
- A programmer is trying to debug an issue where an `ArrayList` (or equivalent dynamic array) in their Java/Python code unexpectedly throws anΒ `IndexOutOfBo...
- Which of the following is a non-relational database?
- Which of the following ACID properties ensures that either all operations within a transaction are completed successfully, or none are?
- Which of the following is NOT a type of database model?
- In a relational database, which relationship allows multiple records in one table to be associated with multiple records in another table?
- Which type of join returns all rows from the left table and matching rows from the right table?
- The 'thrashing' in an operating system is related to:
- What is a page fault?
- Shadow paging in recovery eliminates the need for:
- Shadow Paging avoids: