The objects can be serialized if we extends Serializable interface. Then what are the purpose of writeObect() and readObject() methods? If we want to handle the serialization ourselves, we need to implement these methods or what?
posted 11 years ago
Basically, yes. But if you want to handle serialization yourself, you should implement Externalizable instead of Serializable (and use readExternal/writeExternal, not readObject/writeObject).