>What about the startsWith(String prefix) method?
You can to use startsWith. But you have to use for each letter. For example:
if(s.startsWith("a") || s.startsWith("e") || s.startsWith("i") || s.startsWith("o") || s.startsWith("u"))
>Are you asking if each letter is a vowel or if each word begins with a vowel?
On my code I see if each word begins with a vowel.
>What exactly is that doing?
In a regular expression we have some rules, for examples:
[ ] means that the character is a space or \n or \r
[ ]+ means one or more (spaces or \n or \r)
[aeiou] means that the character is a or e or i or o or u
. means one any character
.* means zero or one or more any character
I use the regular expresssion ("[ ]+") for divide sentence in words. And I Use ("[aeiou].*") for match any word that begins with a or e or i or o or u follow of any character. How I divide this sentence in words each word don't have spaces.