Kiran Kumar Kamineni wrote:
Do I have to implement the serializable interface?
Is the default implementation of the serializable interface enough?
As a side note: Don't use the Object OutputStream unless you know
what you are doing. It is not suited for making objects persistent
as it doesn't handle versioning very well (store a class instance,
change the class definition slightly, and your stored object is
forever beyond reach).
The ability to serialize objects was invented to handle object
transfer over a network, but is widely misused as a persistence
technology because it makes object save/retrieve so (apparently)
simple.
To store objects, use text files a'la properties files, XML
or something similar. It takes a bit more effort as it needs
custom save/load methods.