StringUtil { public static String upFirstChar(String Str) { char[] cs = Str.toCharArray(); if (Character.isLowerCase(cs[0])) { cs[0] -= 32; return String.valueOf(cs); } return Str; } private  StringUtil(); static boolean isNullOrEmpty(String str); static boolean isInteger(String str); static boolean isDouble(String str); static String upFirstChar(String Str); static String lowerFirstChar(String s);  }
@Test public void testUpFirstChar() { Assert.assertEquals("Aa", StringUtil.upFirstChar("aa")); Assert.assertEquals("!", StringUtil.upFirstChar("!")); }