public class HashMapClient { public static void main(String[] args) { Map map = new HashMap(); map.put("google.com", "74.125.53.103"); map.put("slashdot.com", "216.34.181.45"); map.put("cs.washington.edu", "128.208.3.200"); map.put("facebook.com", "69.63.189.11"); map.put("google.com", "99.125.53.103"); map.print(); System.out.println(); System.out.println("do we have google.com? " + map.containsKey("google.com")); System.out.println("do we have facebook.com? " + map.containsKey("facebook.com")); System.out.println("do we have yahoo.com? " + map.containsKey("yahoo.com")); System.out.println(); /* System.out.println("ip address for google.com: " + map.get("google.com")); System.out.println("ip address for facebook.com: " + map.get("google.com")); System.out.println("ip address for yahoo: " + map.get("yahoo.com")); System.out.println(); */ } }