Which of the following statements correctly describe the features of the singleton pattern?
Each correct answer represents a complete solution. Choose all that apply.
A.
Singletons are used to control object creation by limiting the number to one but allowing the flexibility to create more objects if the situation changes.
B.
Singletons can only be stateless, providing utility functions that need no more information than their parameters.
C.
A singleton class may disappear if no object holds a reference to the Singleton object, and it will be reloaded later when the singleton is needed again.
D.
The behavior of a singleton can be obtained by static fields and methods such as
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit