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
Can singleton class be inherited in java?
What is use of super keyword in java?
Can bool be null?
What is use of set in java?
Write java program to reverse string without using api?
Which is better arraylist or vector?
Explain importance of inheritance in java?
Which method must be implemented by all threads?
What is data type example?
What are the common uses of "this" keyword in java ?
What is a java list?
How dead lock situation occurs in java and how you can identify it?
What are different types of classloaders?
What is the size of an array?
Is array serializable java?