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
Why do we need variables?
What is multithreading and its advantages?
What is local variable and instance variable?
Explain the difference between a Thread and a Process.
What are different types of references?
What is the difference between a switch statement and an if statement?
What do you mean by constructor?
Explain the difference between abstract class and interface in java?
Who is founder of java?
What is bubble sorting in java?
What is file in java?
Why do we need hashmap in java?
What is callable java?
Why do we need wrapper class?
What is the static keyword?