Computer Applications

Which of the following statements is false?

  1. A constructor has same name as class name.
  2. A constructor returns initial value.
  3. A constructor is called while creating an object.
  4. A constructor is not used for arithmetical and logical operations.

Java Constructors

25 Likes

Answer

A constructor returns initial value.

Reason — A constructor has no return type as its primary function is to set initial values of data members at the time of creation of an object.

Answered By

16 Likes


Related Questions