We can serialize an object by implementing Serializable interface. Then when should we go for custom Serialization by providing below to methods and Why should we called defaultWriteObject and defaultReadObject methods?
private void writeObject(ObjectOutputStream out) throws IOException
{ out.defaultWriteObject();
}
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
in.defaultReadObject();
}