Iterator iter = map.entrySet().iterator(); while(iter.hasNext()){ Map.Entry entry = (Map.Entry)iter.next(); String key = entry.getKey().toString(); ShoppingCar val = (ShoppingCar)entry.getValue(); } 遍历顺序是从最后一个添加到集合里的对象开始