a) Constructors cannot be synchronized in Java
b) Java does not provide default copy constructor
c) Constructor can have a return type
d) “this” and “super” can be used in a constructor
Answer: c
Explanation: The constructor cannot have a return type. It should create and return new objects. Hence it would give a compilation error.
Related Posts
What would be behaviour if the constructor has a return type?
What would be the behaviour if one parameterized constructor is explicitly defined?
What is not the use of “this” keyword in Java?
What is true about protected constructor?
Abstract class cannot have a constructor.
What is true about constructor?
What is true about Class.getInstance()?
Join The Discussion