The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2000



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 Artima Forums.


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???
> thanks!!!!

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.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us