a) It can contain return type
b) It can take any number of parameters
c) It can have any non access modifiers
d) Constructor cannot throw an exception
Answer: b
Explanation: Constructor returns a new object with variables defined as in the class. Instance variables are newly created and only one copy of static variables are created.
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 Class.getInstance()?
What is false about constructor?
Join The Discussion