title: How to get the first string of each of the data inside a String array?
body: <p>If I have a string array <code>String[] array = new String[3];</code> , how do I get the first characters of each of the data inside that array and store in a new string array <code>String[] newarray = new String[3];</code></p>
  
  <p>For example:</p>
  
  <pre><code>array[0] = AB;
  array[1] = AB;
  array[2] = AB;
  array[3] = AB;
  </code></pre>
  
  <p>I must get all 4 letter "A" because it is the first character in each of the data inside my String[].</p>
  
  <p>So it must be like this:</p>
  
  <pre><code>newarray[0] = first character of array[0] //which is "A"
  newarray[1] = first character of array[1] //which is "A"
  newarray[2] = first character of array[2] //which is "A"
  newarray[3] = first character of array[3] //which is "A"
  </code></pre>