-
Can we overload a constructor in Java 2024?
函数
还可以 我们可以
Questioner:Isabella Lee 2023-05-05 12:30:28
The most authoritative answer in 2024
-

-
Amelia Cooper——Studied at the University of Cambridge, Lives in Cambridge, UK.
In addition to
overloading methods,
we can also
overload constructors in java.
Overloaded constructor is called based upon the parameters specified when new is executed. Sometimes there is a need of initializing an object in different ways. This
can be done using
constructor overloading.
read more >>
About “函数、还可以、我们可以”,people ask:
QuesHub is a place where questions meet answers, it is more authentic than Quora, but you still need to discern the answers provided by the respondents.