title: First char to upper case
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1149855/how-to-upper-case-every-first-letter-of-word-in-a-string">How to upper case every first letter of word in a string?</a><br>
    <a href="https://stackoverflow.com/questions/4052840/most-efficient-way-to-make-the-first-character-of-a-string-lower-case">Most efficient way to make the first character of a String lower case?</a>  </p>
  </blockquote>
  
  
  
  <p>I want to convert the first letter of a string to upper case. I am attempting to use replaceFirst() as described in JavaDocs, but I have no idea what is meant by regular expression.</p>
  
  <p>Here is the code I have tried so far:</p>
  
  <pre><code>public static String cap1stChar(String userIdea)
  {
      String betterIdea, userIdeaUC;
      char char1;
      userIdeaUC = userIdea.toUpperCase();
      char1 = userIdeaUC.charAt(0);
      betterIdea = userIdea.replaceFirst(char1); 
      return betterIdea;
  }//end cap1stChar
  </code></pre>
  
  <p>The compiler error is that the argument lists differ in lengths. I presume that is because the regex is missing, however I don't know what that is exactly.</p>