package java01; class IcCard{ long id; int money; void showInfo(){ System.out.print("卡片卡号"+id); System.out.println(",余额"+money+"元"); } public class java4{ public void main (String [] argv){ IcCard [] manyCard = new IcCard[3]; for (int i=0;i<manyCards.length;i++){ manyCards[i] = new IcCard(); manyCards[i].id = 0x336789AB+i; manyCards[i].money =100+i*123 ; } for (IcCard c : manyCards) c.showInfo(); } }
运行不成功,显示有错误,请问如何修改
慕粉1474736290
隐0123
相关分类