import java.util.Hashtable;런타임:
import java.util.Map;
public class main{
public static void main(String[] args) {
해시 테이블< 문자열, 문자열> ht = 새 해시 테이블< 문자열, 문자열> ();
ht.put("1", "하나");
ht.put("2", "2");
ht.put("3", "3");
개체 obj = ht.remove("2");
System.out.println(obj + "가 제거되었습니다.");
System.out.println("삭제 후 HashSet:");
for (Map.Entry항목 : ht.entrySet())
{
System.out.println("<" +entry.getKey()+", "+entry.getValue()+">");
}
}
}
2개가 삭제되었습니다References:
HashSet 제거 후:
< 3, 세>
< 1, 가>
Please disable your ad blocker and refresh the window to use this website.