void callReceiptBook()
{
Customer customer=new Customer();
customer.name="Brian";
customerName(customer);
System.out.println(customer.name);
}
void customerName(Customer cust) //不明白
{
cust.name="Lara";
}
当调用callReceiptBook()方法,输出结果为什么是"Lara"
解释这段程序 的意思什么 ??非常不明白
{
Customer customer=new Customer();
customer.name="Brian";
customerName(customer);
System.out.println(customer.name);
}
void customerName(Customer cust) //不明白
{
cust.name="Lara";
}
当调用callReceiptBook()方法,输出结果为什么是"Lara"
解释这段程序 的意思什么 ??非常不明白
中我知道Customer是一个类,但Customer cust是什么意思
看完了再告诉我是怎么一回事!