Home > DeveloperSection > Interviews > What is transient variable?

Posted on    May-07-2011 12:43 AM

 Java Java 
 1 Answer(s)
  997  View(s)
Rate this:

Amit Singh

Total Post:565

Posted on    May-07-2011 12:00 AM

Transient variable can't be serialize. For example if a variable is declared as transient in a Serializable class and the class is written to an ObjectStream, the value of the variable can't be written to the stream instead when the class is retrieved from the ObjectStream the value of the variable becomes null.

Don't want to miss updates? Please click the below button!

Follow MindStick