I was looking at the source of HashMap.
A HashMap
implements Serializable
.
Ok this is so that it can be peristed/transmitted as an object.
But I see that the hashtable itself is marked as transient
.
I don't get this.If you mark it as transient, doesn't this mean that it should not be serialized?
But all the data are in the table.So why is it transient
?
Perhaps I am confused on how Serializable
works?