public class BankAccount{
private long moneynum;
//存款
public void addAccount(long num){
moneynum+=num;
}
//取款
public void loadAccount(long num){
moneynum-=num;
}
public String toString(){
return StringvalueOf(moneynum);
}
public void setMoneynum(long moneynum){
thismoneynum=moneynum;
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)