Results 1 to 9 of 9
- 03-27-2011, 06:20 AM #1
Member
- Join Date
- Mar 2011
- Posts
- 20
- Rep Power
- 0
- 03-27-2011, 06:31 AM #2
Senior Member
- Join Date
- Jul 2009
- Posts
- 1,236
- Rep Power
- 13
Have you read the ArrayList API? What constructors or methods do you think might be helpful?
- 03-27-2011, 06:33 AM #3
Member
- Join Date
- Mar 2011
- Location
- Bulacan, Philippines
- Posts
- 23
- Rep Power
- 0
you can try to loop the contents of array to and then copy the contents to the array 2
Keep Moving Forward
- 03-27-2011, 06:34 AM #4
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,716
- Rep Power
- 19
(hint: an ArrayList is a Collection)
- 03-27-2011, 06:37 AM #5
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,716
- Rep Power
- 19
- 03-27-2011, 06:48 AM #6
- 03-27-2011, 06:54 AM #7
Member
- Join Date
- Mar 2011
- Location
- Bulacan, Philippines
- Posts
- 23
- Rep Power
- 0
it is just my suggestion. or he can may be use to just initiate it on another arraylist
newArrayList = oldArrayListKeep Moving Forward
- 03-27-2011, 07:04 AM #8
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,716
- Rep Power
- 19
- 03-27-2011, 07:07 AM #9
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,716
- Rep Power
- 19
And it's a perfectly workable suggestion. It's just that I can't see why anyone would make it, or follow it given what camickr had previously posted.
or he can may be use to just initiate it on another arraylist
newArrayList = oldArrayList
The OP wanted to copy the contents of the list.
Similar Threads
-
how to add Arraylist filter for a jsp page showing results from a servlet-Arraylist
By alok_sharma in forum Java ServletReplies: 7Last Post: 11-22-2010, 02:26 PM -
Printing contents of Arraylist -- strange issue
By YeeP in forum New To JavaReplies: 19Last Post: 08-10-2010, 09:36 AM -
Copying ArrayList into an Array
By Manfizy in forum New To JavaReplies: 6Last Post: 07-16-2009, 08:03 AM -
deep copying arraylist to add to a list
By alvations in forum New To JavaReplies: 13Last Post: 10-08-2008, 04:13 PM -
Java Project Trouble: Searching one ArrayList with another ArrayList
By BC2210 in forum New To JavaReplies: 2Last Post: 04-21-2008, 12:43 PM
Bookmarks