为什么选择ObjectOutputStream.writeObject(Object o); 但不是ObjectOutputStream.writeObject(Serializable o)

use*_*535 10 java serialization objectoutputstream marker-interfaces

在Java中,我们使用序列化的writeObject(Object obj)方法.ObjectOutputStreamObject

但是因为该方法只接受实现java.io.Serializable接口的对象(或者它会抛出NotSerializableException),为什么它仍然使用Object参数而不是SerializablewriteObject(Serializable o)

有任何设计考虑因素吗?