what is a transient variable?

Answer Posted / debapriya patra

When ever we don't want to serialize a variable , we specify
that variable as transient.So that its not be serialized.And
when we de serialize the value we get the default value of
that variable.

And only we mentioned the variables as transient.

Is This Answer Correct ?    12 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between Heap and Stack Memory?

530


What is the function of static in java?

536


Can you create an object of an abstract class?

547


What are reference variables in java?

589


What is a cup of java?

553






Is null a string or object in java?

544


What is final, finally, finalize?

593


What is meant by JVM? Is JVM platform independent or not?

569


List primitive java types?

591


When is the finalize() called?

693


Are arrays classes in java?

530


Why parsing is done?

499


Can there be an abstract method without an abstract class?

532


What are internal and external variables?

540


How does thread synchronization occurs inside a monitor?

545