24 lines
567 B
Java
24 lines
567 B
Java
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.Scanner;
|
|
|
|
public class Vowels {
|
|
public static void main(String[] args) {
|
|
Scanner sc = new Scanner(System.in);
|
|
System.out.println("Please enter your String here: ");
|
|
String str = sc.nextLine();
|
|
System.out.println(vowelsFound(str));
|
|
sc.close();
|
|
}
|
|
|
|
private static boolean vowelsFound(String str) {
|
|
String vowels = "aeoui";
|
|
for (char c : str.toLowerCase().toCharArray()) {
|
|
if (vowels.indexOf(c) != -1) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|