code: public static String capitalize( String text )
      {
          if (text == null || text.length() == 0)
              return text;
          
          if (Character.isLowerCase(text.charAt(0)))
              return Character.toUpperCase(text.charAt(0)) + text.substring(1);
          else
              return text;
      }
docs: Capitalize the given string (null safe)
  @param text String to capitalize
  @return the capitalized string