0

I have 2 questions plz give me as many answers as possible for better understanding!

What is the practical use of constructor overloading?? And do an object has the same copy of an overloaded constructor or different copies?? And one more Shall i have to use different objects for calling multiple constructors of a class in constructor overloading and why??

31st Oct 2018, 2:42 PM
Bunny
Bunny - avatar
1 Answer
+ 2
Look at this Code. Here the Constructor is overloaded. If you create a new Object without Conditions the real and imaginary Part are random Numbers. If you create a new Object as Sum of two others, the overloaded Constructor calculates the new complex Number. https://code.sololearn.com/c20ak0ZscsnE/?ref=app
31st Oct 2018, 2:50 PM
Sebastian Keßler
Sebastian Keßler - avatar