adplus-dvertising
frame-decoration

Question

Which of the following are true for the singleton class?

a.

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

b.

The Singleton pattern can also be used, with slight modifications, when a limited number of instances greater than one are desired

c.

Access restrictions are usually easy to add by restricting the visibility of either the class or the factory method

d.

All of the mentioned

Answer: (d).All of the mentioned

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following are true for the singleton class?