Why we need to serialize the object
Answer Posted / sandeep jaisawal
For an example,if you are suppose to send some data from
obe JVM to other JVM, in that case state of ojects are not
known and will not persist if you dont serialize the object
and sent over a network.
because you allocate seperate heap for seperate JVM.
So you have to tell JAVA that please treat my object, in a
different way because i have make them serialised...
Once the data(object) is serialised, you cant send it any
wr like, write in to DB,othere JVM,files etc. and later
point of time you can deserialise them and you can the same
state of the object.
Hope this help.
Sandeep j
Is This Answer Correct ? | 39 Yes | 3 No |
Post New Answer View All Answers
What does percent mean in java?
How can you make sure that your singleton class will always return single instance in multi-threaded environment?
Define reflection.
What is difference between calling start() and run() method of thread?
Given a singly linked list, determine whether it contains a loop or not without using temporary space?
How do I compare two strings in word in java?
What is purpose of keyword void?
What will happen if static modifier is removed from the signature of the main method?
Explain static nested classes ?
What is immutable in java?
Is java written in c?
How do you check if a string contains only numeric digits?
What is difference between iterator access and index access?
What does void * mean?
Is hashset ordered?