title: Java compilation error - continue cannot be used outside of a loop
body: <p>Getting an error where the Eclipse Java IDE is giving me trouble with continue statements:</p>
  
  <pre><code>    double sum = 0.0;  
      double avg = 0.0;
      for (i=0 ; i&lt;daRun1.length ; i++);
      {
          if(daRun1[i] == max || daRun1[i] == min)
              {
              continue; //&lt;-- **this is where the error is showing (underlined in red in eclipse)**
              }
          sum += daRun1[i];
      }
      avg = sum / (daRun1.length-2);
  
      System.out.println("The average score is: " + avg);
  </code></pre>
  
  <p>What's wrong with my code? This exact if loop was used in a demonstration and there were no problems.</p>