title: Array Index out of Bounds in Eclipse
body: <p>I'm writing a program for Project Euler problem 3, which basically asks for the largest prime factor of 600851475143. While writing, I looked over all my code, but I repeatedly got an "Array Index out of Bounds" for Java. The error is at line 12, and here is the code: </p>
  
  <pre><code>import java.util.Arrays;
  public class largestPrimeFactor {
  
      public static void main(String[] args) {
          // TODO Auto-generated method stub
          int [] woah = new int [9999];
          int [] nice = new int [9999];
          long number = 600851475143L; 
          for (int i = 1; i&lt;999999999999L; i++){ 
              int placeHolder = i - 1;
  
              if (number%i==0){ 
                  woah[placeHolder]=i;
              }
          }
          System.out.println(Arrays.toString(woah));
      }
  }
  </code></pre>
  
  <p>More specifically, it is at "woah[placeHolder] = i. Could anybody take a look at it for me and shoot me a solution? </p>
  
  <p>I appreciate the help, but please do not suggest drastic changes to my code. I am just looking for a quick fix, nothing big that will force me to change my format. Thanks! </p>