public static void same(Listlist){ Map map=new HashMap (); for(int i=0;i it=map.keySet().iterator(); while(it.hasNext()){ String key=it.next(); String value=map.get(key); if(value.indexOf(",")!=-1){ System.out.println(key+" 重复,行: "+value); } } } 转自开源中国 @zsroven