循环里面有点不懂呢,请问有人解释下吗
while(it.hasNext()){
items i=it.next();
sum+=i.getPrice()*goods.get(i);
}
this.setTotalPrice(sum);
return this.getTotalPrice();
while(it.hasNext()){
items i=it.next();
sum+=i.getPrice()*goods.get(i);
}
this.setTotalPrice(sum);
return this.getTotalPrice();
2018-09-05
举报