标签: java
我必须用能够评估新购物者ID号的相应整数值的东西替换-1。
with
答案 0 :(得分:2)
尝试传入nextShopperID并递增它。
return new Shopper(nextShopperID++, name, balance, productLimit);