ITPub博客

首页 > 应用开发 > > for里面循环啥意思看不懂

for里面循环啥意思看不懂

作者:touchfeeling 时间:2019-10-16 13:50:27 0 删除 编辑

for(Car tempCar:dada){                System.out.print(number+".   ");                if(tempCar instanceof PassengerCar)                    System.out.println(tempCar.getName()+"\t"+tempCar.getRentdaily()+"元/天"+"\t"+tempCar.getBusload()+"人"+"\t");                if(tempCar instanceof Trunk)                    System.out.println(tempCar.getName()+"\t"+tempCar.getRentdaily()+"元/天"+"\t"+"\t"+tempCar.getBurden()+"吨");                if(tempCar instanceof PickUp)                    System.out.println(tempCar.getName()+"\t"+tempCar.getRentdaily()+"元/天"+"\t"+tempCar.getBusload()+"人"+"\t"+tempCar.getBurden()+"吨");                number++;            }

for里面循环啥意思看不懂,求大神解释

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1451/viewspace-3136367/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-04-15

  • 博文量
    105
  • 访问量
    1220