title: why are there two different kinds of for loops in java?
body: <p>I have a for loop, and I am not sure how it works. I am familiar with:</p>
  
  <pre><code>for(int i = 0; i &lt;= 9; i++)
  {
      /* implementation */
  }
  </code></pre>
  
  <p>I am confused about a for loop in the following form:</p>
  
  <pre><code>String[] myString = new String[] {"one", "two", "three", "some other stuff"};
  
  String str1 = "", str2 = "";  
  
  for (String s :  myString)
  {
      /* implementation */
  }
  </code></pre>
  
  <p>How do these types of <code>for</code> loops work? what do they do differently then regular <code>for</code> loops?</p>