import java.util.HashMap;


public class DemoHash {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
        HashMap<String,Person> hm = new HashMap<String,Person>();
        
        hm.put("Eric", new Person("Eric",39));
        hm.put("Hugh", new Person("Hugh",5));
        hm.put("Bill", new Person("Bill",20));
        hm.put("Aill", new Person("Aill",20));
        hm.put("Cill", new Person("Cill",20));
        
        Person p = hm.get("Eric");
        if (p == null) {
        	System.out.println("Can not find them");
        } else {
		    System.out.println(p.show());
        }
        for (String key : hm.keySet()) {
        	Person per = hm.get(key);
        	System.out.println(per.show());
        	
        }
		
	}

}

