0
Can we overload the constructor?
4 odpowiedzi
+ 3
Yes you can in java and C++, overloading the constructors is done by changing the number of parameters.
+ 2
You can overload constructors and methods in c++ by changing parameters and return type in c++
Constructor dont have any return type but it is for methods(member function)
But in java the return type of methods must be same
+ 1
In C++ you can also overload the new operator.