Guest User

Untitled

a guest
May 20th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. public String noX(String str) {
  2. String s = "";
  3.  
  4. if (str.length() == 0) {
  5. return s += "";
  6. } else if (str.charAt(0) != 'x') {
  7. return s+= str.charAt(0) + noX(str.substring(1));
  8. } else if (str.charAt(0) == 'x') {
  9. return s += noX(str.substring(1));
  10. }
  11.  
  12. return s;
  13. }
Add Comment
Please, Sign In to add comment