• + 0 comments
    int words = 1`;
    for (char ch : s.toCharArray()) {
            if (Character.isUpperCase(ch)) {
              words += 1;
            }
          }
    
          return words;