Sapient
Company
Programming
In Which of the following situations is it best to use Singleton?
1) If an object has READ_ONLY state (all attributes are final)
2) If an obejct does not have any state (say, no attributes, only methods)
3) If an object has shared state (attributes are present, but those are modified by many of the other objects)
4) All of the given options
Read Solution (Total 1)
-
- If an object has shared state (attributes are present, but those are modified by many of the other objects)
- 7 years agoHelpfull: Yes(0) No(0)
Sapient Other Question