Python Programming - Inheritance - Discussion

Discussion Forum : Inheritance - General Questions (Q.No. 59)
59.
How can you achieve method overriding in Python using the @staticmethod decorator?
By directly using the @staticmethod decorator on the overridden method
By using the @override decorator
By using the @implements decorator
Method overriding is not possible using @staticmethod
Answer: Option
Explanation:
Method overriding in Python can be achieved by using the @staticmethod decorator on the method in the superclass and implementing it in the subclass.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.