What is serialization?What is transient?What is the default value of a transient variable?

Questions by b.sadhukhan   answers by b.sadhukhan

Showing Answers 1 - 9 of 9 Answers

vijayan

  • May 26th, 2006
 

serialization is the state of write the object in the  byte stream

transient r applied to the variables the value cannot be persisit when the object r stored

  Was this answer useful?  Yes

Subin

  • May 30th, 2006
 

sending object in the form of stream..

object is converted as stream and send it to one to other

  Was this answer useful?  Yes

sbarik

  • Jun 8th, 2006
 

Serialization is a process of saving the state of an object..State of the object is represented by its fields.It transforms objects into an output format that is conductive for storing. 

If u dont want to store the value of a field during serialization then u have to declare it as transient.

Dafault value of transient depends on the data type of the field. 

Ganesh Bala Kumar

  • Aug 14th, 2006
 

Hi,

State is nothing but the present values of the class level variables and behaviour (methods) of the class.

Suppose if u r having setters and getters in ur class , when u retrieve the values into the class, just serialize it.

Here all the values of the class will be stored. When ever u deserialize it, u can just call getters of the class. U can get previous values.

  Was this answer useful?  Yes

serialization -- means saving the state of an object at a particalar instance of time.
transient -- appended before a variable to ensure that the valiable is not saved during serailization
default value -- well, that has nothing to do with serailization, it depends on the data type of the variable

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions