title: Does toCharArray resize the char array?
body: <p>There is a confusion with <code>toCharArray</code> in java. While I am writing this code i have noticed that after this line <code>ch = str.toCharArray();</code> char array have been resized.</p>
  
  <pre><code>public static void main(String[] args){
      String str = "helo java";
      char[] ch = new char[str.length() + 1];
      ch = str.toCharArray();
      ch[str.length()] = '\uFDD0';
      for(int i = 0; ch[i] != '\uFFD0'; i++){
          System.out.print(ch[i]);
      }         
  }
  </code></pre>
  
  <p>so my question does this function re-size the array ?
  sorry for my bad English. Thank you</p>