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.
Which of the following is the capital of Mongolia?
Who built the temple ‘Pattadakal’?
Who is the present governor of Assam ?
Which among the below set of colours are generally known as the primary colours of light?
Ganga Jatara is a folk festival primarily celebrated in which part of India?
 Reliance Jio has bagged how much % in the auction of 4G spectrum which also got the tag of highest bidder?
Consider the following statements about the 1929 Lahore Congress Session:
(I) It was presided over by Jawaharlal Nehru.
(II) It declared �...
Which Strait divides India and Sri Lanka?
Which of the following statements is correct?
A. FIMMDA is a voluntary market body for the bond, Money and Derivatives Markets
B. FIMMDA i...
As per the survey by GoBanking Rates, which of the following is the cheapest country to live?