Can the ObjectInputStream.readObject () method return null?
Yes.
You can serialize null by passing it to writeObject() , so you can return it from readObject() .
null
writeObject()
readObject()
However, if you ask about an error case, the answer is no, because readObject() throws an exception in case of an error.
Source: https://habr.com/ru/post/1342043/More articles:Rails 3 Migration not working on Heroku - ruby-on-railsHow to double-check the primary / foreign key constraint for data already in a table on sql server? - sql-serverbase64 to guid to base64 - guidHow to override some gesture events over a webview, but allow others? - androidDisplay image on screen from MVC controller - imageIntuitive understanding of Android tasks - androidhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1342045/bids-ssis-redirect-row-on-error-sends-too-many-rows&usg=ALkJrhjt4fmLEOPh68YjrBW6NbIeFQpJEwCreating an object on the heap without new ones - c ++Using Funcs instead of instances in framework - c #What are some good statistical visualization structures / libraries for user data? - javaAll Articles