I know the definition of singleton class i.e. a class for which only one object can be defined or initialized. But I want to know all the possible ways to achieve this restriction.