KnowledgeBoat Logo

Computer Applications

What is not true for a constructor?

  1. It is used only to initialize the data members.
  2. It returns a unique value.
  3. It may not use parameter.
  4. None of the above.

Java Constructors

20 Likes

Answer

It returns a unique value.

Reason — A constructor has no return type as it doesn't return any value.

Answered By

13 Likes


Related Questions