title: Confusion as to initialization (or lack thereof) of object
body: <pre><code>package lab9;
  
  import java.util.Scanner;
  import java.util.Date;
  
  public class AccountManager
  {
      // the account
      private Account account;
      // reader for reading user input
      private Scanner reader;
      private Transaction transaction;
      private AccountManager accountmanager;
  
  
  
      /**
       * Constructor for objects of class AccountManager
       */
      public AccountManager(Account account, Transaction transaction, AccountManager accountmanager)
      {
          this.account = account;
          reader = new Scanner(System.in);
          this.transaction =transaction;
          this.accountmanager=accountmanager;
  
  
  
  
      }
  
      public void start()
      {
          System.out.println("WELCOME TO THE ACCOUNT MANAGER APPLICATION");
          boolean finished = false;
  
          for(int i=0; i&lt;3; i++)
          {
              // get amount
              System.out.print("Transaction amount to add?\n&gt;");
              String inputAmount = reader.nextLine();
              double amount = Double.parseDouble(inputAmount);
  
              // get type
              System.out.print("Transaction type?\n&gt;");
              String type = reader.nextLine();
  
              // TO DO: get reference
              System.out.print ("Transaction reference?\n&gt;");
  
  
  
  
  
              // date is today's date
              Date date = new Date();
  
              // TO DO: create transaction and add to account
  
  
              System.out.println("Transaction added");
              account.displayTransactions();
  
              // TO DO: display balance
          }
      }
  
      public static void main(String[] args)
      {
  
          Transaction t=new Transaction();
  
          Customer cust = new Customer("Fernando", "Alonso");
          Account account = new Account(cust, "12345");
          AccountManager accountmanager= new AccountManager (account,t, accountmanager);
  
  
  
          // TO DO: create AccountManager object and call start method
  
      }
  
  }
  </code></pre>
  
  <p>Enclosed is my code. I am trying to create an AccountManager object and call its
  start method.</p>
  
  <p>However, I am getting an error identifying that the Accountmanager object may not have been intialized.</p>
  
  <p>I am confused by this greatly; I thought</p>
  
  <pre><code>this.accountmanager=accountmanager;
  </code></pre>
  
  <ol>
  <li>Was the initialization of the accountmanager object? My (limited) understanding is that the initialization involves =.</li>
  </ol>
  
  <p>such as </p>
  
  <pre><code>a=10;
  </code></pre>
  
  <p>And if that were true, then that to me suggests that this.accountmanager=accountmanager would be valid? (Which I am assuming is incorrect, but just wanted to provide my thinking process).</p>
  
  <ol start="2">
  <li>I had previously gotten an error returned to me, identifying that a non-static variable transaction cannot be referenced from a static context.</li>
  </ol>
  
  <p>To remedy this I included:</p>
  
  <pre><code> Transaction t=new Transaction();
  </code></pre>
  
  <p>So that in fell in the scope of the static method. Is that legal/correct?</p>
  
  <p>Error message:</p>
  
  <pre><code> AccountManager accountmanager= new AccountManager (account, t, accountmanager);
  </code></pre>
  
  <p>"variable accountmanager might not have been initialized"</p>