Examveda

What is the role of the @abstractmethod decorator in advanced OOP?

A. To create abstract classes

B. To prevent method overriding

C. To indicate that a method must be overridden in subclasses

D. To define a method as static

Answer: Option C

Solution (By Examveda Team)

The @abstractmethod decorator indicates that a method must be overridden in subclasses.

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