The method signature of ObjectOutputStream
's write method is
public final void writeObject(Object obj) throws IOException
As obj
should implements Serializable
(know about markers).
Why java developers do not write this method as
public final void writeObject(Serializable obj) throws IOException
is there any reason ?