Home » Java ObjectInputStream readObjectOverride() Method with Examples

Java ObjectInputStream readObjectOverride() Method with Examples

by Online Tutorials Library

Java ObjectInputStream readObjectOverride() Method

The readObjectOverride() method of ObjectInputStream class is called by the trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor. It returns an object.

Syntax

Parameter

No parameter is passed.

Returns

The Object read from the stream.

Throws

ClassNotFoundException

OptionalDataException

IOException

Example 1

Output:

null  

Example 2

Output:

null TutorAspire 

You may also like