Results 1 to 2 of 2
- 03-02-2008, 05:27 PM #1Member
- Join Date
- Nov 2007
- Rep Power
:confused: 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'?
- 03-02-2008, 05:44 PM #2
- By Java Tip in forum Java TipReplies: 0Last Post: 03-29-2008, 01:35 PM
- By kavithas in forum New To JavaReplies: 2Last Post: 12-05-2007, 05:56 PM
- By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 09:25 PM
- By lockmac in forum New To JavaReplies: 5Last Post: 08-09-2007, 07:25 PM