title: Why would the for loop on an array in java not initializing
body: <p>There are two four loops on my homework problem but while running the code the final for loop is not initializing at all for the desired iteration.</p>
  <pre><code>public class Arrays {
       /** 
       Reads in 5 scores and show how much each 
       Score differs from the higher score
       */
      public static void main (String[] args)
      {
          Scanner keyboard = new Scanner(System.in);
          double [] score = new double[5];
          int index;
          double max;
      
          System.out.println(&quot;Enter &quot; + score.length + &quot; scores:&quot;);
          score[0] = keyboard.nextDouble();
          max = score[0];
          for (index = 1;index &lt; score.length;index ++)
          {
              score[index] = keyboard.nextDouble();
              if (score[index] &gt; max)
                  max = score[index];
          }
      
          System.out.println(&quot;The new max is &quot; + max);
          System.out.println(&quot;The scores are:&quot;);
          for (index = 0;index &gt; score.length;index++)
              System.out.println(score[index] + &quot; differs the max by &quot; + (max - score[index]));
      }
  
  }
  </code></pre>
  <p>Output received:</p>
  <pre><code>Enter 5 scores:
  10
  10.5
  11
  11.5
  12.5
  The new max is 12.5
  The scores are:
  </code></pre>
  <p>Desired Output:</p>
  <pre><code>Enter 5 scores:
  10
  10.5
  11
  11.5
  12.5
  The new max is 12.5
  The scores are:
  10 differs the max by 2.5
  10.5 differs the max by 2.0
  11 differs the max by 1.5
  11.5 differs the max by 1.0
  12.5 differs the max by 0.0
  </code></pre>