How to count uppercase words in a string in Java?
<p>I need to count the total number of uppercase words in a string, but I just can't figure out how to do it without complex if statements and checks involved.</p>

<p>I've tried and written down something like this:</p>

<pre><code>private int uppercaseWordsCount(String input){
    count = 0;
    String[] ss = input.split("\\s");
    for (String s: ss){
        //???
        }

    }

    return count;

}
</code></pre>

<p>And I still have no clue about a good condition to match my need. The thing is I have to deal with whole words (special characters like exclamation marks count as uppercase characters for the purpose of the method) and not single characters, as the rest of the system I'm writing already does. </p>