Static variables belong to a class and not to any individual instance. The concept of serialization is concerned with the objectâ€™s current state. Only data associated with a specific instance of a class is serialized, therefore static member fields Â are ignored during serialization.
While serialization if you donâ€™t want to save state of a variable. You have to mark that variable as Transient. Environment will know that this variable should be ignored and will not save the value of same.