Examveda

How can you implement method overloading in Python?

A. By defining multiple methods with the same name but different parameters

B. By using the @overload decorator

C. By using the @methodoverload decorator

D. By defining methods with different names

Answer: Option A

Solution (By Examveda Team)

Method overloading is achieved by defining multiple methods with the same name but different parameters.

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