3
Reply

What is the need of transient variables in Java ?

Marcus

Marcus

Jul 11, 2011
32.9k
0

    Variables may be marked transient to indicate that they are not part of the persistent state of an object.
    __________________________________________

    MBA consultants in India

    johnpaulmathew
    July 20, 2011
    0

    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.

    Vulpes
    July 17, 2011
    0

    which type send me [email protected]


    when u achived

    Ravi Prakash
    July 12, 2011
    0