title: Java how to count first letters of every word in a file
body: <p>Basically what the title says. I'm having a lot of trouble doing that.
  Is there a simple way to do it using charAt? I've tried this so far</p>
  
  <pre><code>while (scanner.hasNextLine())
          {
              StringTokenizer st = new StringTokenizer(theText, " /n");    
  
              String word = st.nextToken();
  
              char firstChar = word.charAt(0);
  
              if(theText.charAt(0) == 'a')
              {
                  a++;
              }
  </code></pre>