I am writing a java program and I would like for it to at startup make a JList(of strings) from a pre-made file(text file?) and then do changes here and there during the program and then re-save it at the end to be accessed again later.
I am new to java and it seems like there are many ways to read and write files and I don’t known which way is best.
Is there a general way to save java objects to files that I can re-use later on, maybe with strings?
http://www.javapractices.com/topic/TopicAction.do?Id=42
http://www.java-samples.com/showtutorial.php?tutorialid=330
http://www.caveofprogramming.com/java/java-file-reading-and-writing-files-in-java/
This link provides you different types of reading and writing text files
And there is no general way to write an object to a file, as the object can have any structure. So we have to write the implementation for the way a file is written in java.