It's not a secret anymore!
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes static transient member variable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "static transient member variable" Watch "static transient member variable" New topic
Author

static transient member variable

Mathew Kuruvilla
Ranch Hand

Joined: Nov 27, 2001
Posts: 135
Why would anybody want to have a static transient member variable?
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
First of all, unless my mind is mixed up on terminology, there's no such thing as a static member variable (unless being a member of a class counts). I have more trouble thinking of a time when you would NOT want transient static.
[This message has been edited by David Garland (edited December 10, 2001).]
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Mathew,
Transient just means the variable won't be serialized. Since 'static' vars aren't serialized anyways there's not much point in making a variable 'static transient'.
Not sure why anyone would want one but somewhere out there there is probably a person who has


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: static transient member variable
 
Similar Threads
transient modifier - Q25 of Kumar Majji
transient volatile strictfp 's position in SCJP1.4!
Transient static variables
Tranient variable, help!
is trasient + static valid ??