What Could Be True About Classgetinstance Considering That It #194
What could be true about Class.getInstance() considering that it defines the getInstance() method?
This multiple choice question (MCQ) is related to the book/course gs gs128 Java. It can also be found in gs gs128 Java Classes Methods - Java Constructors - Quiz No.1.
What could be true about Class.getInstance() considering that it defines the getInstance() method?
Class.getInstance calls the constructor
Class.getInstance is same as new operator
Class.getInstance needs to have matching constructor
Class.getInstance creates object if class does not have any constructor