What is deserialization and how do we do deserialization?

Answer Posted / javamasque

Here is updated answer
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 interface.
2. It will use Java’s default serialization mechanism.
3. Generate serial version id for that serializable object.
4. Generate serial version UID for all super classes in hierarchy (all super classes if any) otherwise the properties of all its super classes will be assigned to its default value during deserializtion.
5. ObjectInputStream is used to read [readObject()] object.
6. FileInputStream is used to read from flat file.
7. The flat file extension should be (<file-name>.ser)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the messsage u r going to get from an objectoriented programing?

1849


What is unmodifiable list in java?

699


What is a nonetype?

749


What is the collections api in java programming?

737


Can we declare the static variables and methods in an abstract class?

737






What do you mean by exception handling in Java?

958


What is the static field modifier?

781


Which containers use a flowlayout as their default layout in java programming?

700


What does || mean in code?

760


Is empty in java?

773


Write a method to check if input string is palindrome?

747


Is java a software?

691


Why you should not use singleton?

726


What are the new features in java 8?

777


Can a static method be overridden in java?

730