Results 1 to 6 of 6
Thread: adding list to an array element
- 09-24-2008, 12:46 PM #1
Member
- Join Date
- Jan 2008
- Posts
- 83
- Rep Power
- 0
- 09-24-2008, 12:49 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 09-24-2008, 01:04 PM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
What's the type of your array?
- 09-24-2008, 01:11 PM #4
Member
- Join Date
- Jan 2008
- Posts
- 83
- Rep Power
- 0
i adding rectangle obj to the array.
- 09-24-2008, 04:05 PM #5
Java Code:List <Rectangle> rec; rec=new ArrayList<Rectangle>(); Rectangle bounds = new Rectangle(0, 0, -1, -1); rec.add(bounds);
- 09-25-2008, 04:23 AM #6
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Yep, use Rectangle as generics in ArrayList.
Similar Threads
-
Unique element in an array
By revathi17 in forum New To JavaReplies: 2Last Post: 12-31-2007, 08:44 AM -
Max element in an Array
By mew in forum New To JavaReplies: 5Last Post: 12-03-2007, 05:26 PM -
Adding a double element to a vector
By peachyco in forum New To JavaReplies: 5Last Post: 11-25-2007, 06:07 PM -
Adding List to MIDlet Display
By Java Tip in forum Java TipReplies: 0Last Post: 11-23-2007, 02:07 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks