HashMap에서 Put은 입력뿐만 아니라 수정도 되어 편리하다.
HashMap<Integer, Team> map = new HashMap<>(); map.put(1, "개"); map.put(1, "오리");
위의 코드처럼 같은 key값에 중복하여 put하면 가장 마지막 value가 출력된다.