This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Response: Array of Objects ??
Posted by Jose Botella on August 04, 2000 at 4:14 PM
> hello, i'm writing a program that takes Multiple textfields
> and save them in a file. i make each textfield a String object
> and write each object into a file.i'm also able to each the text
> fields as objects back to each respective fields.
> my problem is how to make the file like a database where i can
> append each new record into the file rather than saving each record
> into a new file.
> do i have to create a randomaccessfile and save my textfields as
> an array of objects???
> is there a simpler way of doing this???
Consider using java.util.Properties to construct a Properties object
that encapsulates key/value pairs. You can load and save it to a file.
The Java Tutorial, trail: Essential java classes, lesson: Setting
program attributes deals with that.
Hope it helps.