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.
Liked By
Write Answer
How do I serialize an object to a file?
Join MindStick Community
You have need login or register for voting of answers or question.
Sumit Kesarwani
23-Aug-2014The 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.