counting letters and spaces
<p>I need to count letters and spaces in some string. output is the string of mine</p>

<p>I tried this: </p>

<pre><code>    for (int i = 0; i &lt; output.length(); i++) {
        if (output.charAt(i) != ' ') {
            letters = letters++;
        } //counting spaces
        else {
            spaces = spaces++;
        }
</code></pre>

<p>It doesn't work. I get 0 letters and 0 spaces. I suppose I need some code instead ' ', right?</p>
