Vidyalelo
Java Programming · Q12

Constructors and Methods

Programming · Java Programming · question 12

Q12

In Java, can a constructor have a return type?

A.
No, constructors do not have a return type
Answer
B.
Yes, it must have the same return type as the class
C.
Yes, it can have any return type
D.
Yes, but it must be "void"

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board