jeudi 28 mai 2015

Is there any way to restrict a class to create only 2 objects

I know about singleton object design pattern. How to allow a class to create only 2 different objects, then it should throw a error.

Aucun commentaire:

Enregistrer un commentaire