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
Difference between start() and run() method of thread class?
Is multiple inheritance supported by java?
How do you escape sequences in java?
How to remove the trailing spaces from a string?
How do I get the | symbol on my keyboard?
What does += mean coding?
Define jre i.e. Java runtime environment?
Explain covariant method overriding in java.
What is a generic type?
What are advantages of using Java?s layout managers than windowing systems?
What is ascii code?
Explain about core java?
Why call by value prevents parameter value change?
What access modifiers can be used for class ?
What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?