강의

멘토링

커뮤니티

Inflearn Community Q&A

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<>();

는 무슨 차이인가요?

java코테 준비 같이 해요!

Answer 1

4

위쪽 코드는 제네릭을 명시해준것이고,

밑쪽 코드는 제네릭을 생략한 것입니다.

생략해도 되는 이유는 타입 추론이 가능하기 때문입니다.

No author

This post's author information has been deleted.

Ask a question