The problem here is that you are reading the serialized object in the same JVM. Since, static variables are common for the JVM, you will get the variable value as currently exisiting, irrespective of whether you have deserialized the object or not. Try changing the value of the static field after you are done writing the serialized object. When you read the serialized object and try to print the modified static field you will get the modified value and not the value that was serialized.
Other way could be read the serialized from a separate JVM i.e. terminate the serializing program and start a new program that just reads from the serialized file. Just try these things out and i am sure you will be able to find out what is happening
Now first run class WriteTest. After that, run class ReadTest. You'll see that test.i will be 2!
This is because static variables are NOT serialized; each JVM has its own values for the variables. As you can see, the first JVM (for WriteTest) has value 1, whereas the second (or ReadTest) will have a value of 2, even after deserializing.