标签: arraylist add
带购买桌面的ArrayList的购物车,表示不应超过库存数量的数量。我试过这个:
public void addToPurchaseCart(desk furniture,int quantity) { if (purchased.quantityInStock>quantity){ purchased.add(furniture); } }
它不起作用!