Could ObjectInputStream.readObject() method return null?
Yes.
You can serialize null
by passing it to writeObject()
, therefore you can get it back from readObject()
.
However, if you are asking about the case of error, the answer is no, since in the case of error readObject()
throws an exception.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With