Computer Science, asked by rishikushwaha, 10 months ago

Explain the concept of constructor overloading with an example in java​

Answers

Answered by dadslover919
2

The one condition for constructor overloading is that both constructors must have different parameters. Like in the above example, in the first constructor, we passed one String and in the second, nothing. We can't make two constructors having exactly same arguments( e.g.- both having two ints ).

i hope this answer helps..

mark me as a brainliest..

Similar questions