Vidyalelo
Python · Q24

Advanced OOP Concepts

Programming · Python · question 24

Q24

How can you implement method overloading in Python?

A.
By defining multiple methods with the same name but different parameters
Answer
B.
By using the @overload decorator
C.
By using the @methodoverload decorator
D.
By defining methods with different names

Answer: Option A

Solution

Answer: Option A
Solution:
Method overloading is achieved by defining multiple methods with the same name but different parameters.