Vidyalelo
Python · Q14

Advanced OOP Concepts

Programming · Python · question 14

Q14

What is the purpose of the @staticmethod decorator in advanced OOP?

A.
To define methods that operate on instances
B.
To define methods that operate on classes
Answer
C.
To define methods that can be overridden
D.
To define methods that require arguments

Answer: Option B

Solution

Answer: Option B
Solution:
The @staticmethod decorator is used to define methods that operate on classes, not instances.