public static String capitalize ( final String string ) { if ( string == null ) throw new IllegalArgumentException ( "string" ) ; if ( string . equals ( "" ) ) throw new IllegalArgumentException ( "string" ) ; return Character . toUpperCase ( string . charAt ( 0 ) ) + string . substring ( 1 ) ; }
Capitalize the first character of the given string .