Python Programming - Polymorphism - Discussion

Discussion Forum : Polymorphism - General Questions (Q.No. 7)
7.
Which of the following is an example of method overloading?
Defining a method with the same name in a class
Defining a method with the same name but different parameters in a class
Defining a method with the same name but different return types in a class
Defining a method with different access modifiers in a class
Answer: Option
Explanation:
Method overloading in Python is achieved by defining a method with the same name but different parameters in a class.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.