I am new to generics and I am not sure if the answer to my question is opinion based or has a genuine reason. In the following code what was need to case a key
opinion based
You've missed the last part of where key is checked for equality with k, so removing assignment (k = e.key) will break the last check -
key
k
(k = e.key)
if (e.hash == hash && ((k = e.key) == key || (key != null && key.equals(k))))