title: Calling Set / Get Methods from another Class and .java file
body: <p>Alright, I'm trying to call setters and getters from another function that's inside another class, in another file. Here's what I'm getting, and I really don't know what I'm doing wrong...</p>
  
  <p>Bank.java</p>
  
  <pre><code>package Bank;
  
  import java.io.*;
  import java.util.*;
  
  public class Bank
  {
    public static void main (String args[]) throws FileNotFoundException
    {
       final String fileName = "Bank/AcctInfo.txt";
       File accounts = new File(fileName);
  
       ArrayList &lt;Object&gt; acctInfo = new ArrayList &lt;Object&gt; ();
          acctInfo = setObjects(accounts);
    }
  
    public static ArrayList setObjects(File document) throws FileNotFoundException
    {
       ArrayList &lt;Object&gt; objectArray = new ArrayList &lt;Object&gt; ();
  
       Scanner fileInput = new Scanner(document);
  
       String blankInfo;
       String accountType;
       String customerType;
       String customerName;
  
       int accountNumber;
  
       float balance;
  
          int counter = 0;    
  
       while (fileInput.hasNext())
       {
  
          accountNumber = fileInput.nextInt();
          blankInfo = fileInput.nextLine();
  
          accountType = fileInput.nextLine();
  
          customerName = fileInput.nextLine();
  
              customerType = fileInput.nextLine();
  
          balance = fileInput.nextFloat();
          blankInfo = fileInput.nextLine();
  
              objectArray.add(new BankAccount());
  
              objectArray.get(counter).setAccNumber(accountNumber);
  
              counter++;
  
       }
  
       return objectArray;
    }
  }
  </code></pre>
  
  <p>BankAccount.java</p>
  
  <pre><code>package Bank;
  
  public class BankAccount extends Bank
  {       
      private int accNumber;
      private String accType;
      private String cusName;
      private String cusType;
      private float bal;
  
      public void setAccNumber(int accountNumber)
      {
          int accNumber = accountNumber;
      }
  
      public int getAccNumber()
      {
          return accNumber;
      }
  
      public void setAccType(String accountType)
      {
          String accType = accountType;
      }
  
      public String getAccType()
      {
          return accType;
      }
  
      public void setCusName(String customerName)
      {
          String cusName = customerName;
      }
  
      public String getCusName()
      {
          return cusName;
      }
  
      public void setCusType(String customerType)
      {
          String cusType = customerType;
      }
  
      public String getCusType()
      {
          return cusType;
      }
  
      public void setBal(float balance)
      {
          float bal = balance;
      }
  
      public float getBal()
      {
          return bal;
      }
  }
  </code></pre>
  
  <p><strong>Errors</strong>:</p>
  
  <pre><code>Bank.java:51: error: cannot find symbol
              objectArray.get(counter).setAccNumber(accountNumber);
                                      ^
  symbol:   method setAccNumber(int)
  location: class Object
  Note: .\Bank\Bank.java uses unchecked or unsafe operations.
  Note: Recompile with -Xlint:unchecked for details.
  1 error
  </code></pre>
  
  <p>It's not completed yet, but if someone can help me through that bit, it'd be a huge help...</p>