Exemplo n.º 1
0
 /**
  * Returns {@code true} if the first letter in the given word is a vowel.
  *
  * <p>Note that this will return {@code true} for things like {@code (array of number)}.
  */
 private static boolean startsWithVowel(String word) {
   for (int i = 0; i < word.length(); i++)
     if (isVowel(word.charAt(i))) return true;
     else if (Character.isAlphabetic(word.charAt(i))) return false;
   return false;
 }