
Write a class, which can be instantiated at most 100 times.
If an attempt is made to instantiate it after 100 instances have been created, the constructor should throw an exception. It should also have a toString method which returns the position of the object in the sequence of instantiations.
how can we set the limit 100?
what is the 'position of the object in the sequence of instantiations'?
any idea?