nerdexam
GIAC

GSSP-JAVA · Question #233

GSSP-JAVA Question #233: Real Exam Question with Answer & Explanation

The correct answer is A. Singletons are used to control object creation by limiting the number to one but allowing C. A singleton class may disappear if no object holds a reference to the Singleton object, and D. The behavior of a singleton can be obtained by static fields and methods such as. See the full explanation below for the reasoning.

Question

Which of the following statements correctly describe the features of the singleton pattern? Each correct answer represents a complete solution. Choose all that apply.

Options

  • ASingletons are used to control object creation by limiting the number to one but allowing
  • BSingletons can only be stateless, providing utility functions that need no more information
  • CA singleton class may disappear if no object holds a reference to the Singleton object, and
  • DThe behavior of a singleton can be obtained by static fields and methods such as

Community Discussion

No community discussion yet for this question.

Full GSSP-JAVA Practice