프로그래머스 폰켓몬 문제를 풀다가 궁금해져서 찾아봤다
차이점
HashMap <String, Integer> map = new HashMap<>();
map.put("사과", 1);
map.put("포도", 2);
->{'사과': 1, '포도': 1}
int num[] = {1, 1, 3, 2, 3}
HashSet<Integer> set = new HashSet<>();
for(int i : nums)
set.add(i);
->{1, 2, 3}
(폰켓몬 코드 中)