code: public static String capitalize(String s)
      {
          if (s == null || s.length() == 0)
          {
              return s;
          }
          char chars[] = s.toCharArray();
          chars[0] = Character.toUpperCase(chars[0]);
          return new String(chars);
      }
docs: Small helper method to capitalize the first character of the given string.
  
  @param s
  string to capitalize
  @return a string starting with a capital character.