title: Java For Loop differences
body: <p>Are these statements completely the same in terms of memory occupation and efficiency in Java?<br>
  <br>
  <strong>First</strong>:</p>
  
  <pre><code>Object[] array = new Object[100];
  int i = 0;
  for (; i &lt; array.length; i++){
     Object o = array[i];
     //do something
  }
  </code></pre>
  
  <p><strong>Second</strong>:</p>
  
  <pre><code>Object[] array = new Object[100];
  for (int i = 0; i &lt; array.length; i++){
     Object o = array[i];
     //do something
  }
  </code></pre>
  
  <p><strong>Third</strong>:</p>
  
  <pre><code>Object[] array = new Object[100];
  for (Object o : array){
     //do something
  }
  </code></pre>