Subclass Construction

public class CheckingAccount extends BankAccount
{
   public CheckingAccount(double initialBalance)
   {
      // Construct superclass
     
super(initialBalance);
      // Initialize transaction count
      transactionCount = 0;
   }
   . . .
}

Why didn't the SavingsAccount constructor in Section 10.1 call its superclass constructor?

   Answer: It was content to use the default constructor of the superclass, which sets the balance to zero.


When you invoke a superclass method with the super keyword, does the call have to be the first statement of the subclass method?

   Answer: No – this is a requirement only for constructors. For example, the SavingsAccount.deposit method first   increments the transaction count, then calls the superclass method.