Prev Next

Java / Variable

What is transient variable in Java?

Transient variable cannot be serialized.

For example if a variable is declared as transient in a class implementing Serializable interface and the class is persisted to an ObjectStream, the value of the variable is ignoerd and not written to the stream. When the class is retrieved from the ObjectStream the value of the variable becomes null.

❤Cash Back At Stores you Love !!!❤

Earn your $10 reward when you make your first purchase through Ebates by signing up with clicking below button.

Ebates Coupons and Cash Back

More Related questions...

Show more question and Answers...

Local Variables

Comments & Discussions