Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Why we need to serialize the object

Answers were Sorted based on User's Feedback



Why we need to serialize the object..

Answer / bindhu

Whenever an object is to be sent over the network, and
moreover if the state of an object is to be saved, objects
need to be serialized...

Is This Answer Correct ?    63 Yes 2 No

Why we need to serialize the object..

Answer / 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

Why we need to serialize the object..

Answer / ragunath

Serialization is the process of saving the state of an object by converting it to a stream of bytes.the main purpose of serialize the object is to save the state of an object in order to have the ability to recreate the same object when required.

Is This Answer Correct ?    23 Yes 2 No

Why we need to serialize the object..

Answer / balaji

when ever an object's state needs to be saved to retrieve it
after some time we need to serialize the object.
Serialization is the process of writing the state of an object
to the stream.
The state of an object will be available in instance variables.

Is This Answer Correct ?    27 Yes 7 No

Why we need to serialize the object..

Answer / sivadasan

Serialization is a process of writing the state of an
object to the byte stream and also its used to store the
state of an Object (such as a file or memory buffer). Its
for security purpose to send an object on the network.

Is This Answer Correct ?    8 Yes 1 No

Why we need to serialize the object..

Answer / ashwin

mr.sandeep ur answer is little bit clear but wat happens if
i dont serialize and send thro a network will there any
dataloss ?

Is This Answer Correct ?    2 Yes 1 No

Why we need to serialize the object..

Answer / vivek

Perfect answer !! http://stackoverflow.com/questions/5877808/when-should-i-use-serializable-in-c

Is This Answer Correct ?    0 Yes 0 No

Why we need to serialize the object..

Answer / ragunath

object should be user friendly,it should be understand by the
third party on his first sight, to find the object

Is This Answer Correct ?    3 Yes 7 No

Why we need to serialize the object..

Answer / sreenivasulu

if you don't serialize and send ur data over the network
there may be loss of data.
say for example if you declare your variable as a transient
and sent over network you will loose the data.

Is This Answer Correct ?    3 Yes 8 No

Why we need to serialize the object..

Answer / saravana shankar

because the function to be indentified the object to the
variable.. so it needs to be serialize it ..

Is This Answer Correct ?    3 Yes 19 No

Post New Answer

More Core Java Interview Questions

why we write public static void main (String args[]) in core java plz explain briefly??????????????????

3 Answers   HCL,


What is the functionality of the stub?

0 Answers  


I want to store more than 10 objects in a remote server? Which methodology will follow?

0 Answers  


what is actual real time using of oops concepts in projects(Interface,polymorphism.abstraction.........)

2 Answers  


why string constant pool in java

2 Answers   TCS,


Is there any way to find whether software installed in the system is registered by just providing the .exe file? I have tried the following code but its just displaying the directory structure in the registry. Here the code : package com.msi.intaller; import java.util.Iterator; import ca.beq.util.win32.registry.RegistryKey; import ca.beq.util.win32.registry.RootKey; public class RegistryFinder { public static void main(String... args) throws Exception { RegistryKey.initialize(RegistryFinder.class.getResource("jRe gistryKey.dll").getFile()); RegistryKey key = new RegistryKey(RootKey.HKLM, "Software\\ODBC"); for (Iterator<RegistryKey> subkeys = key.subkeys(); subkeys.hasNext();) { RegistryKey subkey = subkeys.next(); System.out.println(subkey.getName()); // You need to check here if there's anything which matches "Mozilla FireFox". } } }

0 Answers   Google,


What is difference between static and abstract class?

0 Answers  


Java is pass by value or pass by reference? Explain

0 Answers  


What is type inference in java8?

0 Answers  


Can you access non static variable in static context?

0 Answers  


What is user defined exception in Java?

0 Answers   TCS,


What is finalize() function in java?

0 Answers  


Categories