Q:

Which of the following are true for the singleton class

0

Which of the following are true for the singleton class


  1. Singleton classes should be used whenever it is important that only a single instance of a class exist and that that single instance be widely accessible
  2. The Singleton pattern can also be used, with slight modifications, when a limited number of instances greater than one are desired
  3. Access restrictions are usually easy to add by restricting the visibility of either the class or the factory method
  4. All of the mentioned

Answers

D. All of the mentioned

total answers (1)