title: ArryIndexOutOfBoundsException in counter/odd even sorter
body: <pre><code>public class CounterAndSorter
  {
      public static void main (String[] args)
      {
          int counter = 1;
          int oddSum = 0;
          int evenSum = 0;
  
          while(counter &lt;= 25)
          {
              if(counter % 2 &gt; 0)
              {
                  oddSum += counter;
              }
              else
              {
                  evenSum += counter;
              }
  
              counter++;
          }
  
          System.out.println("The sum of the even integers is " + evenSum);
          System.out.println("The sum of the odd integers is " + oddSum);
      }
  }   
  </code></pre>
  
  <p>I have recently started java and am trying to write a program to generate 100 random integers, then sort them into even and odds and display them via arrays. I can compile the above code but am unable to execute it. I continually receive a Out Of Bounds Exception. Any help would be appreciated.</p>