user image

Pooja Sharma

Job Interview Skills
English
2 years ago

. How do I serialize an object to a file?

user image

Abhishek Mishra

2 years ago

The class whose instances are to be serialized should implement an interface Serializable. Then you pass the instance to the ObjectOutputStream which is connected to a fileoutputstream. This will save the object to a file.

Recent Doubts

Close [x]