import java.util.Hashtable;Exécution:
import java.util.Map;
public class main{
public static void main(String[] args) {
Hashtable<String, String> ht = new Hashtable<String, String>();
ht.put("1", "un");
ht.put("2", "deux");
ht.put("3", "trois");
Object obj = ht.remove("2");
System.out.println(obj + " a été supprimé");
System.out.println("HashSet après suppression: ");
for (Map.Entryentry : ht.entrySet())
{
System.out.println("<"+entry.getKey()+", "+entry.getValue()+">");
}
}
}
deux a été suppriméRéférences:
HashSet après suppression:
<3, trois>
<1, un>
Please disable your ad blocker and refresh the window to use this website.