Advertisement
exnon

entferenVokale

Jul 4th, 2019
520
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1.     public String entferneVokale(String wort)
  2.     {
  3.         String result="";
  4.         if(wort==null){
  5.             throw new IllegalArgumentException();
  6.         }
  7.         if(wort.length()==0){
  8.             return result;
  9.         }
  10.        
  11.         char c = wort.charAt(0);
  12.         if (istVokal(c)){
  13.             return result+entferneVokale(wort.substring(1));
  14.         }
  15.         return result+c+entferneVokale(wort.substring(1));
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement