iphone新手# Apple - 家有苹果
j*y
1 楼
public class CashHolder {
private double amountHeld=0.0;
}
public void getCash() {
CashHolder wallet = new CashHolder();
// Lookup the Teller using RMI
Teller teller= (Teller) java.rmi.
Naming.lookup("//localhost/TellerObject");
// Withdraw 100.00 from account #9856432 and put it into
// Wallet.
teller.withdrawFunds("9856432",wallet,100.00);
// Go somewhere and spend it
..
}
How do you change the code above to allow teller.withdrawFunds() to update
the CashHolde
private double amountHeld=0.0;
}
public void getCash() {
CashHolder wallet = new CashHolder();
// Lookup the Teller using RMI
Teller teller= (Teller) java.rmi.
Naming.lookup("//localhost/TellerObject");
// Withdraw 100.00 from account #9856432 and put it into
// Wallet.
teller.withdrawFunds("9856432",wallet,100.00);
// Go somewhere and spend it
..
}
How do you change the code above to allow teller.withdrawFunds() to update
the CashHolde