Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. public boolean stringE(String str) {
  2. int count = 0;
  3. for(int i = 0; i< str.length(); i++) {
  4. if(str.charAt(i) == 'e') {
  5. count++;
  6. }
  7. }
  8. return (count >= 1 && count <= 3);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement