title: Have to get the number of letters in an ArrayList of strings
body: <p>If I am given an ArrayList of strings, i.e. <code>{"hello", "goodbye", "morning", "night"}</code>, how do I check how many <code>a</code>'s, <code>b</code>'s, <code>c</code>'s, etc. there are in the list? </p>
  
  <p>The method must return an array of <code>int</code>s, where position [0] is the numbers of <code>a</code>'s, etc. For example, the <code>returnArray[1] = 1</code>, because there is one <code>b</code> in the list. Is there a better way to do this than simply hardcoding each letter?</p>
  
  <pre><code>public static int[] getLetters( ArrayList&lt;String&gt; list) {
      int [] result = new int[25];
      if(list.contains('a')) {
          result[0] = result[0] + 1;
      }
      return result;
  }
  </code></pre>
  
  <p>Is there a better way than repeating the above strategy 25 more times?</p>