Variables may be marked transient to
indicate that they are not part of the
persistent state of an object.
__________________________________________
MBA consultants in India
Interviews3 answers
3 Answers
johnpaulmathewPosted Jul 20, 2011, 2:19 AM EDT
If you mark an instance field of a Java class as 'transient', it means that it is not part of the persistent state of an object of that class.
Its main use is when you're serializing an object. Any fields marked as 'transient' are simply ignored in the serialization process. This is equivalent in C# to marking a field with the NonSerialized attribute.
VulpesPosted Jul 17, 2011, 2:00 AM EDT
Ravi PrakashPosted Jul 12, 2011, 2:13 AM EDT

