title: Having trouble with accessing array data from one class to another
body: <p>I am having some trouble with passing data of an array from one class to the next. </p>
  
  <p><em>edits</em>
  I am now no longer getting the error, and my code compiles, but as I had been warned, I got null for every element of the array. Now that I have taken out the static modifiers though, it still gives me null. I have also updated the code.</p>
  
  <p>Here is the class where the array is created.</p>
  
  <pre><code>public class AssignSeat {
  
  String[] arrangement = new String[12];
  
  public void SeatStart() {
  
      arrangement[0] = "Collins";
      arrangement[2] = "Faivre";
      arrangement[3] = "Kinnard";
      arrangement[6] = "Morgans";
      arrangement[7] = "Rohan";
      arrangement[8] = "Shatrov";
      arrangement[9] = "Sword";
      arrangement[11] = "Tuckness";
  
      System.out.format("%-15s%-15s%n", "seat", "passenger");
  
      for (int i=0; i&lt;arrangement.length; i++) {
          System.out.format("%-15s%-15s%n", i+1, arrangement[i]);
  
      }
  
  }
  
  public String[] getArrangement() {
      return arrangement;
  }
  
  public void setArrangement(String[] arrangement) {
      this.arrangement = arrangement;
  }
  }
  </code></pre>
  
  <p>and here is the method trying to access the information. It is specifically the for loop that I need help with so Ignore other areas where there are mistakes. Thank you.</p>
  
  <pre><code>public void actionPerformed(ActionEvent event) {
      Scanner scanner = new Scanner(System.in);
      AssignSeat seat = new AssignSeat();
  
      if(event.getSource() instanceof JButton){
  
          JButton clickedButton = (JButton) event.getSource();
          String buttonText = clickedButton.getText();
  
          if (buttonText.equals("first class")) {
              entername.setVisible(true);
              seatnum.setVisible(true);
              confirmed.setVisible(true);
              inputline.setVisible(true);
              outputline.setVisible(true);
              if ((seat.arrangement[1] == null)) {
                  System.out.println(seat.arrangement[0]);
                  System.out.println(seat.arrangement[2]);
                  two.setForeground(Color.green);
              }
          } else if (buttonText.equals("coach")) {
              //System.out.println("so does this!");
              entername.setVisible(true);
              seatnum.setVisible(true);
              confirmed.setVisible(true);
              inputline.setVisible(true);
              outputline.setVisible(true);
              if ((seat.arrangement[4] == null)) {
                  five.setForeground(Color.green);
              } 
              if ((seat.arrangement[5] == null)) {
                  six.setForeground(Color.green);
              } 
              if ((seat.arrangement[10] == null)) {
                  eleven.setForeground(Color.green);
              } 
          }
      }
  
  }
  </code></pre>