title: foreach on json array
body: <p>I have two java applications. In both of them I am iterating json array using foreach:</p>
  
  <pre><code>JSONArray logList = jobj.getJSONArray("creation_time");
  for (Object log : logList) {
  
  }
  </code></pre>
  
  <p>In one project there is no error, however in the other there is a red line under <code>logList</code> with the error <code>Can only iterate over an array or an instance of java.lang.Iterable</code></p>
  
  <p>I have the same imports in both projects and I am using Java 8. I am really confused why this is happening.</p>