In this post we will see How HashMap works internally in Java. We will see what happens if we have duplicate key as well as hash collision.