A serializable object must be an instance of a class that implements java.io.Serializable or java.io.Externalizable interface.
The Externalizable interface includes two abstract methods
The developer has to define these methods so he has better control on the object and this can provide better performance.Code:
void readExternal(ObjectInput in)
void writeExternal(ObjectOutput out)