Beginner Object-Oriented Programming Concepts
Q35 / 100

Why might a class have multiple constructors with different parameters?

Correct! Well done.

Incorrect.

The correct answer is A) To allow objects to be created in different ways depending on the information available

A

Correct Answer

To allow objects to be created in different ways depending on the information available

Explanation

Multiple constructors (an application of overloading) give callers flexibility, e.g. creating an object with default values or with specific ones.

Progress
35/100