Iterator it; 
改为 Iterator it = null ;  

解决方案 »

  1.   

                                         it=set.iterator();//放在第一个循环的
    下面的这段放在第一段可以运行,放到第二段就不行了,it.hasNext()这个地方就不执行
      while(it.hasNext()){
      Map.Entry me=(Map.Entry)it.next();
                System.out.println("大家好"+me.getKey()+":"+me.getValue()+":"+me.hashCode());
            }
      

  2.   

    因为第二块里面是看不到第一块里面的内容,所以就是没有初始化所以最好你要  改为 it = null,初始化