int (String str) { int count = 0; boolean vowelSeen = false; char[] strchars = str.toCharArray(); for (char strchar : strchars) { if (isVowel(strchar)) { vowelSeen = true; } else if (vowelSeen) { count++; vowelSeen = false; } } return count; }