title: java: how to manipulate data array in main class?
body: <p>This is called <code>GoHomeAction.java</code></p>
  
  <pre><code>import javax.swing.*;
  
  import java.awt.Image;
  import java.awt.event.ActionEvent;
  
  import static java.awt.event.KeyEvent.VK_H;
  
  public class GoHomeAction extends BrowserAction {
  
      public GoHomeAction(BrowsersTabbedPane controller) {
      }
  
      public void actionPerformed(ActionEvent e) {
          //need to add to data[] which is located in MainClass.java
  
      }
  }
  </code></pre>
  
  <p>in this action, I need to add to the <code>data[]</code> which is located in one of the functions inside <code>MainClass.java</code></p>
  
  <p>how can I achieve this ?</p>