posted 18 years ago
Hi there!
I wonder what exactly happens to a static variable that has been declared and initialized in a class that implements Serializable and when that class is passed to an output stream with the writeObject() method as follows:
Output: 10 0 10
As static variables would not be serialized, should'nt s2.z return 0? What exactly is happening here. Can someone explain?