Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
购物车,带有要购买的桌子的 ArrayList,指示数量不应超过库存数量。我试过这个:
public void addToPurchaseCart(desk furniture,int quantity) { if (purchased.quantityInStock>quantity){ purchased.add(furniture); } }
它不起作用!