fix: ReversedString
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user