private static String capitalFirst(@Nullable String str){
  return str == null ? null : str.isEmpty() ? "" : Character.toUpperCase(str.charAt(0)) + str.substring(1);
}

private static String capitalFirst ( @ Nullable String str ) { return str == null ? null : str . isEmpty ( ) ? "" : Character . toUpperCase ( str . charAt ( 0 ) ) + str . substring ( 1 ) ; }
capitalizes the first character of the given string .
