public static String capitalize(String s){
  if (Character.isLowerCase(s.charAt(0))) {
    return Character.toUpperCase(s.charAt(0)) + s.substring(1);
  }
 else {
    return s;
  }
}

public static String capitalize ( String s ) { if ( Character . isLowerCase ( s . charAt ( 0 ) ) ) { return Character . toUpperCase ( s . charAt ( 0 ) ) + s . substring ( 1 ) ; } else { return s ; } }
uppercases the first character of a string .
