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
how is final different from finally and finalize in java?
What is the difference between preparedstatement and statement in java?
How many JVMs can run on a single machine and what is the Just-In-Time(JIT) compiler?
Difference between Preemptive scheduling vs. Time slicing?
How to create an interface?
What is the exact difference in between Unicast and Multicast object?
what is thread in Java ?
What is immutable state?
Can we use different return types for methods when overridden?
What are the advantages of unicode?
What are the access modifiers available in java?
Is linked list a linear or non-linear data structure?
when a request is generated from apache tomcat 5.5 and goes to oracle 10g or mysql,,, how the oracle or mysql reads the request as apache is a web server and oracle 10g is application server? when the oracle 10g provides response, how the apche tomcat reads it???
Does sprintf allocate memory?
What are loops in java?