0

Whats the need for a class

to have multiple constructors.

23rd Apr 2018, 5:31 PM
stephen haokip
stephen haokip - avatar
1 Answer
+ 9
A class can have multiple constructors, as long as their signature (the parameters they take) are not the same. You can define as many constructors as you need. When a Java class contains multiple constructors, we say that the constructor is overloaded (comes in multiple versions). tutorials.jenkov.com/java/constructors.html
23rd Apr 2018, 5:38 PM
Scooby
Scooby - avatar