+ 1
Can we add two constructors in a single class?
4 Answers
+ 6
in Python, you can only have one __init__ method. But you can define functions that can initialize your object in different ways. These works constructors essentially.
also:
https://www.geeksforgeeks.org/creating-multiple-constructors-python-class/
Other languages support OOP multiple constructors.
+ 6
probesh subba ,
your post seems to be incomplete.
> please add the *programming language* you are talking about in the tags.
0
In C++,You can as many
0
Yes , in java u can add two or more constructors but with different parameters...