Set<Map.Entry<Goods, Integer>> goods = cart.getAllgoods().entrySet();
for (Map<Goods, Integer> obj : goods)
上面两句代码出现的类型转换问题,怎么解决??
Type mismatch: cannot convert from element type Map.Entry<Goods,Integer> to Map<Goods,Integer>
改成for (Map.Entry<Goods, Integer> obj : goods)