import java.util.HashMap;출력:
public class remove_element_HashMap {
public static void main(String[] args) {
HashMapmap = new HashMap ();
map.put("값1",15);
map.put("값2",48);
map.put("값3",21);
map.put("값4",87);
map.put("값5",159);
map.put("값6",17);
System.out.println("제거 전: "+map);
개체 elmDeleted = map.remove("value3");
System.out.println("삭제된 항목은 "+elmDeleted);
System.out.println(""+elmDelete+": "+map)이 제거되기 전에;
}
}
제거 전: {value5=159, value6=17, value3=21, value4=87, value1=15, value2=48}
item deleted is 21
21을 제거하기 전에: {값5=159, 값6=17, 값4=87, 값1=15, 값2=48}
Please disable your ad blocker and refresh the window to use this website.