|
-
Nov 28th, 2005, 06:39 AM
#1
Thread Starter
Fanatic Member
File Write from ArrayList
I have an array list full of player (football/soccer) objects that contain information on each player (39 of them).
How can i write the contents of an arraylist to a file?
p.s. I have methods to retrieve all the necessary information from the objects. (The array list is constructed and filled in a different class [not the Player class]).
Last edited by x-ice; Feb 25th, 2007 at 07:27 PM.
-
Nov 29th, 2005, 01:09 AM
#2
Re: File Write from ArrayList
Make your "player" class serializable, then use a for each loop and serialize each object in the array list to a separate file
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Nov 29th, 2005, 10:45 AM
#3
Thread Starter
Fanatic Member
Re: File Write from ArrayList
 Originally Posted by ComputerJy
Make your "player" class serializable, then use a for each loop and serialize each object in the array list to a separate file
I want to write all objects in the arraylist to the same file.
I have solved it now though, so dont worry.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|