有人知道super()的用法么?
public class BankAccount
{
private double balance;
public BankAccount(double initBalance)
{
balance = initBalance;
}
}
public class SavingsAccount extends BankAccount
{
double interestRate;
public SavingsAccount(double initRate,double initBalance)
{
super(initBalance);
interestRate = initRate;
}
}
有人知道以上的program里super(initBalance)代表什么,有什么重要意义?为什么是必须的?
谢谢~!