Why is the table attribute of Hashtable serialized?
问题 Why is the table field of Hashtable serialized, although it is marked as transient ? 回答1: It is marked as transient because it is unsafe to use the default serialization scheme on the Entry array. Rather, when a Hashtable is deserialized, the keys in the table must be rehashed and the entries must be added to slots according to the new hashcode values. This is necessary because the keys may have different hashcodes after deserialization ... for a variety of reasons. This work will be done by