Here you can find the source of startsWithVowel(String string)
public static boolean startsWithVowel(String string)
//package com.java2s; //License from project: Open Source License public class Main { private static char[] VOWELS = { 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U' }; public static boolean startsWithVowel(String string) { char[] stringChars = string.toCharArray(); vowelLoop: for (char c : VOWELS) { for (char c2 : stringChars) { if (Character.isLetter(c2)) { if (c2 == c) { return true; } else { continue vowelLoop; }//from w w w . j av a 2 s.c om } } } return false; } }