Solved

Which of the Following Statements Is False

Question 7

Multiple Choice

Which of the following statements is false?


A) You cannot prevent client code from creating objects of a class.
B) One common use of a private constructor is sharing initialization code among a class's other constructors.
C) Another common use of private constructors is to force client code to use so-called "factory methods" to create objects.
D) A factory method is a public static method that creates and initializes an object of a specified type (possibly of the same class) , then returns a reference to it.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions