Ravi Pavan wrote:
i want to know in what situation ,In fact we should restrict the maximum number of object of a class.
That's an impossible question--there could be any number of reasons why we'd want to restrict the number of class instantiations. The most common would be because we only
need one instance. Singletons are, however, frequently debated.