title: Add data to array in loop
body: <p>I have an "do - while" loop with 5000 numbers that should get added to an array during each run through the loop like this:</p>
  
  <p>The problem is that every time the loop is executed, the numbers get overwritten and only the last runthrough of data is in the array once the loop finishes. </p>
  
  <p>I use this code:</p>
  
  <pre><code>    long cursor = -1;
      long[] fArray = new long[100000];  // more than enough space in array
      IDs ids = twitter.getFollowersIDs(name, cursor); // start with first page of 5000 numbers
  
      do 
      {                       
          ids = twitter.getFollowersIDs(name, cursor);            
          fArray = twitter.getFollowersIDs(name, cursor).getIDs(); // this gets Array with 5000 numbers every time until "empty"
          cursor = ids.getNextCursor();   // jump to next array with 5000 new numbers     
      } while (ids.hasNext());
  </code></pre>