Skip to content

Instantly share code, notes, and snippets.

@thenaveensaggam
Created September 30, 2019 04:43
Show Gist options
  • Save thenaveensaggam/4c80a1a6d596822aae0909bcd81a67ae to your computer and use it in GitHub Desktop.
Save thenaveensaggam/4c80a1a6d596822aae0909bcd81a67ae to your computer and use it in GitHub Desktop.
public boolean stringE(String str) {
int count = 0;
for(int i = 0; i< str.length(); i++) {
if(str.charAt(i) == 'e') {
count++;
}
}
return (count >= 1 && count <= 3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment