𝑴𝒂𝒑 : Key, Value 쑴재 μ—¬λΆ€ 확인

uuuouuoΒ·2022λ…„ 4μ›” 28일
0

Map

λͺ©λ‘ 보기
2/5
post-thumbnail

πŸ“ Key, Value 쑴재 μ—¬λΆ€ 확인


public static void main(String[] args) {
    Map<String, String> map = new HashMap<String, String>();
    map.put("A", "apple");
    
    // true 좜λ ₯
    System.out.println(map.containsKey("A")); 
    System.out.println(map.containsValue("apple"));
}

0개의 λŒ“κΈ€