Answer Posted / javamasque
We have to fallow below steps to serialize an object
1. The object to be serialized need to implement java.io.Serializable / java.io. Externalizable interface.
2. Generate serial version id for that serializable object.
3. ObjectOutputStream is used to write [writeObject(..) or wirteExternal()] object.
4. FileOutputStream is used to persist in flat file.
5. The flat file extension should be (<file-name>.ser)
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is google full form?
Can a class have a static inner class?
What is a void in java?
What is operator overloading. Is it is supported in java?
What is a subsequence of a string?
What is starvation?
What do you mean by exception handling in Java?
Name few "optional" classes introduced with java 8 ?
How many days will it take to learn java?
How does arrays sort work in java?
Which container method is used to cause a container to be laid out and redisplayed in java programming?
What is java and why do we need it? Explain
What does percent mean in java?
Explain the key functions of data binding?
What is the use of static class?