Which concept allows a subclass to provide a specific implementation of a…

2025

Which concept allows a subclass to provide a specific implementation of a method that is already defined in the superclass?

  1. A.

    Overloading

  2. B.

    Inheritance

  3. C.

    Polymorphism

  4. D.

    Overriding

Attempted by 152 students.

Show answer & explanation

Correct answer: D

Correct Answer: Overriding

The concept that allows a subclass to provide a specific implementation of a method already defined in the superclass is called Method Overriding.

In Method Overriding, the subclass redefines a method with the same name and parameters as the one in the superclass. This allows the subclass to change the behavior of the inherited method while maintaining the same interface.

हिन्दी उत्तर: ओवरराइडिंग

सही उत्तर: ओवरराइडिंग (Overriding) है।

मिथोड ओवरराइडिंग वह अवधारणा है जिसके द्वारा एक सबक्लास सुपरक्लास में परिभाषित किसी मेथड का विशिष्ट कार्यान्वयन प्रदान कर सकता है। इसमें सबक्लास सुपरक्लास के मेथड का नाम और पैरामीटर समान रखते हुए उसका व्यवहार बदल देता है।

Explore the full course: Bpsc