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 an example of CAM plant?Ā
What is the term for the method used to separate leaf pigments in green plants?
Kinnow mandarin is a cross between King andĀ
Detrimental effect of host plant on the biology of insect is known as _________
Thompson seedless is one of the important variety of :
____ is a milk process that makes milk more easily digested by those with a sensitive digestive system.
Which plant species does not possess xylem vessels?
Journal āIndian Horticultureā is published by _________
Vegetative propagation of date palm is through _________
Which plant growth regulator is commercially used in grapes for berry elongation?