372,675 views
27 votes
27 votes
write a recursive, boolean-valued method, containsvowel, that accepts a string and returns true if the string contains a vowel.

User Mostruash
by
2.8k points

1 Answer

5 votes
5 votes

Answer:

boolean containsVowel(String sentence)

if (sentence.isEmpty()) return false;

if (sentence.charAt(0) == 'a'

Step-by-step explanation:

User Panagiss
by
3.2k points