阅读背景:

如何递增静态变量然后将其分配给实例变量?

来源:互联网 
public abstract class BankAccount {

    private static int nextAccBalance = 12345678;

    private double balance;
    private int accountNumber;
    private Customer owner;
    private AccountType type;

    public BankAccount(double balance, Customer owner, AccountType type) {
        this.balance = balance;
        this.owner = owner;
        this.type = type;
    }

    abstract void deposit(double amount);
    abstract void withdraw(double amount);
    abstract void monthEnd();

}
public abstract class BankAccount {

    privat



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: