title: Why does the foreach statement not change the element value?
body: <p>How come the following prints boss and not bass? </p>
  
  <pre><code>String boss = "boss";
  char[] array = boss.toCharArray();
  
  for(char c : array)
  {
   if (c== 'o')
       c = 'a'; 
  }
  System.out.println(new String(array)); //How come this does NOT print out bass?It prints boss.
  </code></pre>