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 is the difference between exception and error in java?
What are use cases?
What does escaping a character mean?
What is defined as false sharing in the context of multithreading?
What is a platform?
How do you sort objects in java?
What is data type modifier?
Can variables be used in java without initialization?
Explain java coding standards for constants?
Explain features of interfaces in java?
When do we use hashset over treeset?
FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?
What is a nested class?
Why 1 is not a prime number?
What is the final keyword in java?