title: Java for loop vs. while loop. Performance difference?
body: <p>Assume i have the following code, there are three for loop to do something. Would it run fast if i change the most outer for loop to while loop? thanks~~        </p>
  
  <pre><code>int length = 200;
  int test = 0;
  int[] input = new int[10];
  
  for(int i = 1; i &lt;= length; i++) {
      for (int j = 0; j &lt;=length - i; j++) {
          for (int k = 0; k &lt; length - 1; k++) {
              test = test + input[j + k];
          }
      }
  }
  </code></pre>