Question
In object-oriented programming, what type of
polymorphism is achieved at runtime?ÂSolution
Method Overriding is an example of runtime polymorphism. It occurs when a subclass provides a specific implementation of a method that is already defined in its superclass. At runtime, the method that gets executed depends on the object type (the subclass instance), not the reference type (the superclass reference), thus achieving polymorphism. This allows for flexibility in code, as the same method can behave differently depending on the object calling it. Why Other Options are Incorrect: A) Method Overloading: This is an example of compile-time polymorphism, not runtime polymorphism. C) Operator Overloading: While it is a form of polymorphism, it is resolved at compile time and is not applicable to runtime polymorphism. D) Constructor Overloading: Constructor overloading is a type of compile-time polymorphism, as the constructor to be invoked is determined at compile time. E) Function Overloading: Similar to method overloading, this is also resolved at compile time, not at runtime.
Who among the following became the first Indian to win the prestigious Zurich Diamond League Final 2022 in Switzerland?
In Uttarakhand, which one of the following areas is not covered under the ‘State Integrated Co-operative Development Project?
Which of the following statements is INCORRECT?
Who appoints the Central Vigilance Commissioner (CVC)?
In a volleyball game, each team comprise of how many players?
The vocal performance Kathakali has traditionally been performed in _______.
Which of the following statements regarding 'Bugyaals' in the state of Uttarakhand is false?
In the presence of oxygen in _________, the pyruvate dissolution occurs.
Which is the northernmost point of India?
What is the designated theme for International Women's Day 2025, observed annually on March 8th?