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


Please Help Members By Posting Answers For Below Questions

Does chrome use java?

516


What is a condition in programming?

552


What is java console application?

555


What is an exception in java?

640


Give a brief description of java socket programming?

517






What is the purpose of skeleton and stub?

582


I want to re-reach and use an object once it has been garbage collected. How it's possible?

533


What are parsing rules?

496


What is thread life cycle?

535


What is the transient keyword?

625


Can we assign integer value to char in java?

508


What is void class in java?

524


Why is java logo a cup of coffee?

618


What is set in java?

522


What do you mean Abstraction in java?

605