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
AnswerC.
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.