constructer overloading in java example
Answers
Answered by
1
Answer:
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 ).
Similar questions