in Education by
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 I have been asked this question in class test. The origin of the question is Constructor topic in chapter Classes and Methods of Java Select the correct answer from above options Java questions and answers, Java questions pdf, Java question bank, Java questions and answers pdf, mcq on Java pdf, Java questions and solutions, Java mcq Test , Interview Java questions, Java Questions for Interview, Java MCQ (Multiple Choice Questions),Core Java Questions, Core Java MCQ,core java interview questions for experiencedcore java interview questions for 3 years experience,java programming questions,core java interview questions for freshers,java interview questions and answers for freshers, java programming questions and answers pdf, java interview questions for beginners

1 Answer

0 votes
by
 
Best 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().

Related questions

0 votes
    What is true about a break? (a) Break stops the execution of entire program (b) Break halts the ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    What is true about do statement? (a) do statement executes the code of a loop at least once (b) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which statement is true about java? (a) Platform independent programming language (b) Platform dependent programming ... and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    What is true about private constructor? (a) Private constructor ensures only one instance of a class exist at ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    What is true about constructor? (a) It can contain return type (b) It can take any number of ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    What is true about protected constructor? (a) Protected constructor can be called directly (b) Protected ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which of the following is true about Java system properties? (a) Java system properties are accessible by any ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    What is true of final class? (a) Final class cause compilation failure (b) Final class cannot be ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    What is false about constructor? (a) Constructors cannot be synchronized in Java (b) Java does not provide ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which of these is correct about passing an argument by call-by-value process? (a) Copy of argument ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which of these methods is used to know whether a string contains true ? (a) valueOf() (b) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which method returns the elements of Enum class? (a) getEnums() (b) getEnumConstants() (c) getEnumList( ... questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    Which class does all the Enums extend? (a) Object (b) Enums (c) Enum (d) EnumClass The question ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    Which concept of Java is a way of converting real world objects in terms of class? (a) Polymorphism ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which concept of Java is achieved by combining methods and attribute into a class? (a) Encapsulation (b) ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
...