Given an input string, complete a helper method that extracts the vowels and returns the string All strings are lowercase. Do not use any loops or regular expressions. Test case 1:

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 17RQ
icon
Related questions
Question
Given an input string, complete a helper method that extracts the vowels and returns the string of the vowels in the input string recursively.
All strings are lowercase.
Do not use any loops or regular expressions.
Test case 1:
extractVowel("i love you 3000")
"ioeou"
Test case 2:
extractVowel("aiueo")
"aiueo"
Given methods:
public static String extractVowel (String str) {
return extractVowelHelper (str, 0, "");
}
1
2
3
4
private static boolean isVowel (char c){
return c == 'a' || c == 'e' || c == 'i' || c == '0' || == 'u';
}
5.
6.
7.
Transcribed Image Text:Given an input string, complete a helper method that extracts the vowels and returns the string of the vowels in the input string recursively. All strings are lowercase. Do not use any loops or regular expressions. Test case 1: extractVowel("i love you 3000") "ioeou" Test case 2: extractVowel("aiueo") "aiueo" Given methods: public static String extractVowel (String str) { return extractVowelHelper (str, 0, ""); } 1 2 3 4 private static boolean isVowel (char c){ return c == 'a' || c == 'e' || c == 'i' || c == '0' || == 'u'; } 5. 6. 7.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Methods of StringBuilder class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT