import java.util.Hashtable;Runtime:
import java.util.Map;
public class main{
public static void main(String[] args) {
Hashtable< Строка, строка> ht = новая хеш-таблица< Строка, строка> ();
ht.put("1", "один");
ht.put("2", "два");
ht.put("3", "три");
Объект obj = ht.remove("2");
System.out.println(obj + " был удален");
System.out.println("HashSet после удаления:");
for (Map.Entryentry : ht.entrySet())
{
System.out.println("<" +entry.getKey()+", "+entry.getValue()+">");
}
}
}
two был удаленReferences:
HashSet после удаления:
< 3, три>
< 1, А>
Please disable your ad blocker and refresh the window to use this website.