我看不出这堂短课有什么问题。我得到 8 个类、接口或枚举预期错误。谢谢
public class BankAccount {
public BankAccount {
private double balance = 0;
}
public BankAccount(double balanceIn) {
private double balance = balanceIn;
}
public double checkBalance {
return balance;
}
public void deposit(double amount) {
if(amount > 0) balance += amount;
}
public void withdraw(double amount) {
if(amount <= balance) balance -= amount;
}
}