Multiple choice

Will having two or more constructors in a class cause an error?

  1. Always

  2. Never

  3. Not necessarily

  4. All of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Having multiple constructors is called constructor overloading. It is perfectly valid as long as the constructors have different parameter lists (different signatures).