Source Code:
public class AllVowels {
public static void main(String[] args) {
boolean result = checkAllVowels(“aeiou”);
System.out.println(result);
}
public static boolean checkAllVowels(String str) {
str = str.toLowerCase();
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c != 'a' && c != 'e' && c != 'i' && c != 'o' && c != 'u') {
return false;
}
}
return true;
}
}
Output:
