WHAT IS TRANSIENT VARIABLE?

Amit Singh

Total Post:565

Points:2825
Posted by  Amit Singh
Java 
 1182  View(s)
Ratings:
Rate this:
  1. Amit Singh

    Post:565

    Points:2825
    What is transient variable?

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!