"자바 HashMap.containsKey()"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-==참고 자료== +==참고==))
잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
2번째 줄: 2번째 줄:
;자바 HashMap .containsKey()
;자바 HashMap .containsKey()


<source lang='java'>
<syntaxhighlight lang='java'>
HashMap<String,Object> hm = new HashMap<String,Object>();
HashMap<String,Object> hm = new HashMap<String,Object>();
hm.put("first", "1");
hm.put("first", "1");
11번째 줄: 11번째 줄:
// true
// true
// false
// false
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==

2020년 11월 2일 (월) 02:49 판

1 개요

자바 HashMap .containsKey()
HashMap<String,Object> hm = new HashMap<String,Object>();
hm.put("first", "1");
hm.put("second", "4");

System.out.println( hm.containsKey("first") );
System.out.println( hm.containsKey("third") );
// true
// false

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}