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 has the authority to declare dividends?
With reference to the Specific Relief Act, 1963 select the correct pairing of Section and its title from options below:
APEDA & MPEDA comes under the ambit of which ministry
As per the Insurance Act what is the nature of fire insurance business?
Who is responsible for reviewing compliance with the regulations and verifying the effectiveness of internal control systems, as per Reg 5H of SEBI (Pr...
President of India is elected by?
Which of the following entities qualifies as an "insurer" according to the Insurance Act?
Which ministry is related to BIS
Section 113A of Evidence Act was added in
For which of the following purposes can the National Legal Aid Fund be applied as per the Legal Service Authorities Act?