KnowledgeBoat Logo
|

Computer Applications

Assertion: A class can have multiple constructors.

Reason: Multiple constructors are defined with same set of arguments.

  1. Assertion is true, Reason is false.
  2. Both assertion and Reason are false.
  3. Both assertion and Reason are true.
  4. Assertion is false, Reason is true.

Java Constructors

2 Likes

Answer

Assertion is true, Reason is false.

Reason — A class can have multiple constructors, this is called constructor overloading. However, multiple constructors cannot have the same set of arguments because that would cause ambiguity. Each constructor must have a different number or type of parameters.

Answered By

3 Likes


Related Questions