a) Class.getInstance calls the constructor
b) Class.getInstance is same as new operator
c) Class.getInstance needs to have matching constructor
d) Class.getInstance creates object if class does not have any constructor
Answer: d
Explanation: Class class provides list of methods for use like getInstance().
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 false about constructor?
Join The Discussion