No author
This post's author information has been deleted.
Introduction to Java Algorithm Problem Solving: Coding Test Preparation
1. Class President (HashMap additional explanation in the latter half of the video)
Written on
·
541
0
HashMap<Character, Integer> a = new HashMap<Character, Integer>();
이랑
HashMap<Character, Integer> a = new HashMap<>();
는 무슨 차이인가요?
Answer 1
4
위쪽 코드는 제네릭을 명시해준것이고,
밑쪽 코드는 제네릭을 생략한 것입니다.
생략해도 되는 이유는 타입 추론이 가능하기 때문입니다.