Exception Handling Part 3 | ObjectOutputStream and ObjectInputStream Class in Java

Опубликовано: 05 Апрель 2026
на канале: learners adda
67
0

ObjectInputStream and ObjectOutputStream
----------------------------------------
ObjectInputStream and ObjectOutputStream classes
are used to store objects state permanently in
files.

ObjectOutputStream class is subclass of ObjectOutput
interface. It implements below method to write
object to underline output stream.


public void writeObject(Object ob)throws IOException

ObjectInputStream class is a subclass of ObjectInput
interface. It implements below method to read object
to underline output stream.

public Object readObject() throws IOException