134k views
1 vote
What type of a set contains only one element​

User Porlune
by
7.6k points

1 Answer

6 votes

Answer:

singleton:

A singleton is a class that allows only a single instance of itself to be created and gives access to that created instance. It contains static variables that can accommodate unique and private instances of itself. It is used in scenarios when a user wants to restrict instantiation of a class to only one object.

User Roland Pish
by
7.5k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories