You're right. There is only one value for each key. But this does not mean that several keys have the same value.
Think of HashMap as a box of boxes, each box can contain only one object, and each box is marked with a key. Therefore, after you put the apple in a box with a mark of 1, you can not put it in orange if you do not pull the apple out first. However, nothing prevents you from putting oranges in boxes 2 3 and 4.
source share