Results 1 to 2 of 2
Thread: instantiation
- 03-02-2008, 04:27 PM #1
Member
- Join Date
- Nov 2007
- Posts
- 13
- Rep Power
- 0
instantiation
: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'?
any idea?
- 03-02-2008, 04:44 PM #2
Similar Threads
-
Instantiation using an instance factory method
By Java Tip in forum Java TipReplies: 0Last Post: 03-29-2008, 12:35 PM -
Instantiation
By kavithas in forum New To JavaReplies: 2Last Post: 12-05-2007, 04:56 PM -
Instantiation using an instance factory method
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:25 PM -
object instantiation and arrayList
By lockmac in forum New To JavaReplies: 5Last Post: 08-09-2007, 06:25 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks