string - Java I/O to a .txt file -


i learning java , far have been able troubleshoot problems of google , trail , error/reading. little lost here:

i have list of names. have method takes string argument , deletes name list , returns rest of names. created file holds names. once name deleted want stay deleted week, @ beginning of next week want names listed again. initial thought use arrays wouldn't work since washed out of memory end of program execution. tried writing data file , reading , writing every time. here current problem:

person1,person2, person3.... when remove person1, rewrite file person2 , person3 only. if person2 removed rewrite file person3. problem have remove sequentially otherwise strings removed rewritten. want remove 1 string list when ever string selected without affecting rest.

(this first time posting here if there missing let me know , try improve question. didn't post code because decided start on , code didn't make sense anyways.)

if want start scratch can use serialization feature.

create class has 1 list variable can hold person1,person2, person3.... using serialization can store object file have list of these names. when again read object(deserialize) have names can delete perticular , again store object in file.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -