返回列表 发帖
第二版103页
http://www.wanjuanchina.net/book ... ntScripComplex.java
代码第32行中,if语句的表达式里面的变量名错误:
int amount = Integer.parseInt(reader.readLine());
if (price < 0) {
        System.out.println("商品数量不能小于0!");
        hasMoreGoods = 1;                // 赋值1,确定下次肯定会循环
        continue;
}

应该为if (amount < 0)

TOP

好的。我找书确认一下。
在网上购买本书的读者,请给本书发一个好评。谢谢大家。

TOP

返回列表