2 ms·
For mutable objects in an OOP language, the object's identity is "the original data". The values that may happen to be stored in any other fields at various poi
by munificent 9y ago
For mutable objects in an OOP language, the object's identity is "the original data". The values that may happen to be stored in any other fields at various points in time are not part of the object's state and cannot affect the hash code. (If they could, mutating the object would change its hash code, which would be Very Bad.)