62,614
社区成员
发帖
与我相关
我的任务
分享
package exercise4;
public class TestBanking {
public static void main(String[] args) {
Bank b =new Bank();
b.addCustomer("Jane" , "Smith" );
b.addCustomer("Owen" , "Bryant");
b.addCustomer( "Tim" , "Soley" );
b.addCustomer("Maria", "Soley" );
for ( int i = 0; i < b.getNumberCustomers(); i++ ) {
Customer customer = b.getCustomer(i);
System.out.println("Customer [" + (i+1) + "] is "
+ customer.getLastName()
+ ", " + customer.getFirstName());
}
}
}
为什么我的for循环整个个没有运行一样值也赋上了 for里面什么都打印不了