OnJava8-Examples icon indicating copy to clipboard operation
OnJava8-Examples copied to clipboard

About Appendix: Understanding equals() and hashCode()

Open antaow opened this issue 3 years ago • 0 comments

Bruce, When I read your chapter on Appendix: Understanding equals() and hashCode(), In the section of Understanding hashCode(), original text:The put() method places the keys and values in corresponding ArrayLists. In accordance with the Map interface, it must return the old key or null if there was no old key.

I think it should return old value.

antaow avatar Jun 28 '22 14:06 antaow