title: Accessing an ArrayList of an Abstract Superclass in a Subclass' method
body: <p>This is just part of my code. I have this Abstract Superclass called Account, and I want to access the ArrayList in a Subclass's method:</p>
  
  <pre><code>public abstract class Account {
      private String accountNumber;
      private ArrayList&lt;String&gt; accountRecords;
  
      public Account() {
          super();
          accountRecords = new ArrayList&lt;String&gt;();
      }
  
      public String getAccountNumber() {
          return accountNumber;
      }
  
      public abstract void addTransaction(String transactionInfo);
  
  }
  
  
  public class SubAccount extends Account {
  
      public SubAccount() {
          super();
      }
  
      public void addTransaction(String transaction) {
          if (super.getAccountNumber() != null &amp;&amp; 
              !super.getAccountNumber().isEmpty()) {
  
                  accountRecords.add(transaction); //How can I access the 
                                                   ArrayList here?
          }
      }
  }
  </code></pre>