Hi Ritchie,
Thanks for the reply, really appreciate it!
The main reason I would want to use Object Stream because it more easier to store data on individual elements(Object's Information) which belongs to the arraylist. The problem with using BufferReader and FileReader is that I have to put in more codes(Even though it not much different but I just want to be more "code" efficient and reducing the chances of code errors) but I like the part is that you can edit the existing information using notepad while Object Stream method can't.
However, in this example where
one Integer value is needed and where "BufferReader and FileReader" (in fact i think scanner and FileReader also works) is alot better where you just need to read one line of value which I didn't thought of that until you pointed that out.
As for the shut down hooks.. I try to explain in simple terms.. You have to look what kind of application you are creating. It seems that "shut down hooks" is suitable for server type applications due to the allocation of resources for each connection to the external database. What "shut down hooks" does is to prevent shutdown of the server.
Note: I got the information from
hereand
here.
So I am creating a simple client application so there is no need for "shut down hooks".
As for the getting the value of Integer from the text file. I have not got any chance to try it out.. I have to restricted my time on java programming as I have another different assignment due this Friday morning. Probably I will look into this Saturday evening..
Any comments on this topic would be great!!
Thanks
Regards,
Jon