java - Why does ObjectOutputStream.writeObject not take a Serializable? -
why objectoutputstream.writeobject(object o) not take serializable? why taking object?
this because writeobject in objectoutputstream overrides the method in the objectoutput interface not require object serializable.
the objectoutput interface specifies methods allow objects written stream or underlying storage, may achieved process other serialization. objectoutputstream implements functionality, requires serializable objects. however, cannot modify signature of interface implements.
Comments
Post a Comment