Java tutorial
import java.util.IdentityHashMap; public class Main { public static void main(String args[]) { IdentityHashMap<Integer, String> ihmap = new IdentityHashMap<Integer, String>(); ihmap.put(1, "from"); ihmap.put(2, "java2s.com"); ihmap.put(3, "tutorial"); System.out.println("Value of ihmap before: " + ihmap); // remove element at key 2 ihmap.remove(2); System.out.println("Value of ihmap after remove: " + ihmap); } }