static int countUpperCaseCharacters(S s) { int n = 0; for i over s: if (isUpperCase(s.charAt(i)) ++n; ret n; }