title: Populating ArrayList
body: <p>I am trying to populate an array list, however, my array list constantly equals 0, and never initializes, despite my declaring it over main().</p>
  
  <p>This is my code.</p>
  
  <pre><code>static ArrayList&lt;Integer&gt; array = new ArrayList&lt;Integer&gt;(10); //The parenthesis value changes the size of the array.
  static Random randomize = new Random(); //This means do not pass 100 elements.
  
  public static void main (String [] args)
  {
      int tally = 0;
      int randInt = 0;
  
      randInt = randomize.nextInt(100); //Now set the random value.
      System.out.println(randInt); //Made when randomizing number didn't work.
      System.out.println(array.size() + " : Array size");
  
      for (int i = 0; i &lt; array.size(); i++)
      {
          randInt = randomize.nextInt(100); //Now set the random value.
          array.add(randInt);
          tally = tally + array.get(i); //add element to the total in the array.
      }       
      //System.out.println(tally);
  }
  </code></pre>
  
  <p>Can someone tell me what is going on? I feel rather silly, I've done ArrayLists for my default arrays and I cannot figure this out to save my life!</p>