It's not a secret anymore!
The moose likes Beginning Java and the fly likes ArrayList - read/write textfile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ArrayList - read/write textfile" Watch "ArrayList - read/write textfile" New topic

ArrayList - read/write textfile

Justin Sotar

Joined: Jan 27, 2005
Posts: 1
Hello. I have written a program that uses an arraylist to store data. This data is inputted into a record and then the record is stored at each spot in the arraylist. Therefore, each spot in the arraylist contains a record with several types of data.
What I need to do is read and write the arraylist so that the data can be read in and saved accordingly at the beginning and end of the program. I am not sure how to go about doing this, and was wondering if someone had an idea. I appriciate any ideas or help. Thanks!
Marcus Laubli
Ranch Hand

Joined: Dec 24, 2004
Posts: 116

Take a look at the Tokenizer class. I think that might help you.

Marcus L´┐Żubli, SCJP 1.4, CLP 5.0, SCWCD 1.4 (preparing)
I agree. Here's the link:
subject: ArrayList - read/write textfile
It's not a secret anymore!