title: Java - How to access an ArrayList of another class?
body: <p>Hello I'm a beginner in Java and this is my question:
  I have this first class with the following variables:</p>
  
  <pre><code>import java.util.ArrayList;
  
  public class numbers {
      private int number1 = 50;
      private int number2 = 100;
  }
  </code></pre>
  
  <p>And I have this class too:</p>
  
  <pre><code>import java.util.ArrayList;
  
  public class test {
      private numbers number;
  }
  </code></pre>
  
  <p>My question here is: I want to store the number1 &amp; number2 variables into an ArrayList, then access this ArrayList from class test. How can I do that?</p>