Actually this is really tricky..... As statics are not at all valid for serialization as serialization is for objects an statics are not object variables...... but transient variables are object variables but we make it transient because we don't want eh value to be recorded or saved and also we make it transient for a object reference if that class is not implementing serializable.
Well i think transient variables are instance variables which are not used for serialization.
The
java compiler does not complaint if you declare a static member field as transient. However, there is no point in declaring a static member field as transient, since transient means: "do not serialize", and static fields would not be serialized anyway.
Its like static variables are transient but transient variables cannot always be static. its more like the equals and hashcode thing