title: When does an enhanced for loop actually modify an Underlying Array?
body: <p>In an enhanced for loop like:</p>
  
  <pre><code>String[] a = {"dog", "cat", "turtle"};
  
  for (String s : a)
  {
      out.println("String: " + s);
      s = in.readLine("New String? ");
  }
  </code></pre>
  
  <p>When would this actually affect array A? We learned in class that an Enhanced For loops doesn't actually modify the underlying array but that there some special cases. I think this has something to do with memory management, but I'm not sure. Can someone please help me understand this?</p>