1.

What is true about Class.getInstance()?(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» The correct answer is (d) Class.getInstance creates object if class does not have any constructor

The explanation is: Class class provides list of methods for use like getInstance().


Discussion

No Comment Found

Related InterviewSolutions