What is deserialization and how do we do deserialization?
Answer Posted / javamasque
Deserialization is a process of retrieving object from byte stream. We have to fallow below steps for de-serialization
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. ObjectInputStream is used to read [readObject() or readExternal()] object.
4. FileInputStream is used to read from flat file.
5. The flat file extension should be (<file-name>.ser)
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Differentiate between static and non-static methods in java.
Is there a sort function in java?
When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?
What is a boolean in java?
Is static variable stored in heap?
What is the indent key?
How do you escape a string?
What is the finalize method do?
How many techniques can be employed to create a string object?
What is java virtual machine and how it is considered in context of java’s platform independent feature?
Does collectionutils isempty check for null?
What is final method in java?
What is static in java?
What is the range of a character variable?
Why do we need data serialization?