How can I change an all caps string to capitalize on first letter and then first letter following each space? (Java)
<p>Let's say we have a string in java:</p>

<pre><code>String str = "ALL CAPS MATE";
</code></pre>

<p>How can I change it so that it looks like this but for any word:</p>

<pre><code>String result = "All Caps Mate";
</code></pre>

<p>Is there a String method similar to .toUpperCase() or .toLowerCase()?  If there is, I can't seem to find it.</p>

<p>I would appreciate a string method solution.</p>

<p>Thanks.</p>