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.
The legal maxim Actus Non Facit Reum Nisi Mens Sit Rea means________________
How is a contract of sale made according to the Sale of Goods Act, 1930?
Ejusdem generis means:
Which case is known as Post-Master Case?
What is the minimum amount of default specified by the Central Government for initiating insolvency and liquidation proceedings under IBC?
Appeal against the decision of Director General under Foreign trade(Regulation and Development) Act lies to the
How can a subscriber authenticate an electronic record under section 3 of the Information technology Act, 2000?
Falsus in uno falsus in omnibus i.e. false in one thing, false in everything, the said maxim is _______.
Food and Agriculture Organization of UN was founded in
Who among the following is/are public servant (s)?