Examveda
Examveda

What is method overriding in Python?

A. Replacing a method with a new method

B. Defining a method in a subclass with the same name as in the base class

C. Calling a method from a different class

D. Creating a new method in a subclass

Answer: Option B

Solution(By Examveda Team)

Method overriding involves defining a method in a subclass with the same name as in the base class to modify its behavior.

This Question Belongs to Python Program >> Advanced OOP Concepts

Join The Discussion

Related Questions on Advanced OOP Concepts

What is inheritance in OOP?

A. Creating new objects from existing ones

B. Allowing objects to share attributes and methods

C. Restricting access to object attributes

D. Converting classes into objects