Answers for "why static variables cannot be serialized in java"

0

why static variables cannot be serialized in java

Static Variable. 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.Dec 29, 2013
Posted by: Guest on March-18-2020

Code answers related to "why static variables cannot be serialized in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language