测试重复的Hashcode


        String a="Aa";
        String b="BB";
        System.out.println(a.hashCode());
        System.out.println(b.hashCode());
        
        Hashtable<String,String> map=new Hashtable<String,String>();
        map.put(a,"test");
        map.put(a,"test");
        System.out.println(map.size());
        System.out.println(map.get(a));
        System.out.println(map.get(b)); 
 

 

        

posted @ 2012-03-16 12:06  再快一点  阅读(186)  评论(0编辑  收藏  举报