Saving ObjectsObject have state and behavior. Behaviour lives in the class, but state live with in each indivijual Object.
If your data will be used by only the java program that generated it, then use Serialization.
Write a file that holds serialized
If your data is used by other program then write a plain text file.
write a text file which delimiters that other programs can prase.
Files are nothing but collection of files.
In this post we are going to deal with the text files.
Writing text data into a file
it is similar to writing an object, except you write a string instead of object, and FileWriter instead of FileOutputStream.
Reading a text data from the file