BruceEckel / OnJava8-Examples

Code Examples for the book "On Java 8"

Home Page:http://www.OnJava8.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About Appendix: Understanding equals() and hashCode()

antaow opened this issue · 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.