title: Extracting vowels from string using recursion?
body: <p>Not Sure if this code will work? or if there is another way to write it in a simpler way? </p>
  
  <pre><code>public static String extractVowels(String s, StringBuilder x, int i){
      if(i &lt; s.length()){
        if(s.charAt(i)== 'a' || s.charAt(i)== 'e' || s.charAt(i)== 'i' || 
           s.charAt(i)== 'i' || s.charAt(i)== 'o' || s.charAt(i)== 'u'){
          x = new StringBuilder(s);
          return extractVowels(s,x.deleteCharAt(i), i+1);
        }
      }
      return null;
    }
  </code></pre>