posted 15 years ago
I don't think it is superfluous, consider the following situation. [Read the topic wrong!!!]
1) Serialize an Object
2) Do Some operations using the transient variable (increment or pass it to some method..)
3) Deserialize the Object
4) Try accessing the transient variable , it will be initialized to the default value.
But if you have marked the variable static, then it will not be initialized because the static does not belong to a particular instance.
I cranked some code to check this out.