Skip to content

Commit

Permalink
Adding solution
Browse files Browse the repository at this point in the history
  • Loading branch information
josdem committed Apr 11, 2024
1 parent 524a86c commit dc00895
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
public class UppercaseCounter {

public int count(String message) {
return message.length();
return message.chars().filter(Character::isUpperCase).toArray().length;
}

public boolean hasSpace(String message) {
return message.isEmpty();
return message.contains(" ");
}
}

0 comments on commit dc00895

Please sign in to comment.