String (String s) { if (s.isEmpty()) return s; if (s.length() == 1) return s.toUpperCase(Locale.ROOT); char ch = s.charAt(0); if (Character.isUpperCase(ch)) return s; return Character.toUpperCase(ch) + s.substring(1); }