This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes Transient Variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Transient Variables" Watch "Transient Variables" New topic
Author

Transient Variables

Kush Kush
Greenhorn

Joined: Apr 27, 2004
Posts: 11
What is the use of transient variables ? When shouls variable be declared transient ? Do it have any demerits ?


Smile with JAVA
Tim West
Ranch Hand

Joined: Mar 15, 2004
Posts: 539
Transient variables aren't included in the object stream when an object is serialised.

--Tim
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Transient Variables