My input here need to be not case-sensitive. I'll show you my code please help, I have zero idea how to do it. Do I need to re write my code for it to be not case-sensitive?
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s, x;
System.out.print("Enter a sentence: ");
s = sc.nextLine();
char[] c = s.toCharArray();
int vowel=0;
for (int i = 0; i < s.length(); i++) {
if(s.charAt(i)=='a' || s.charAt(i)=='e' || s.charAt(i)=='i' || s.charAt(i)=='o' || s.charAt(i)=='u')
vowel++;
}
System.out.println("There are "+ vowel + " vowels in the sentence");
System.out.print("\nEnter a substring that you want to search: ");
x = sc.nextLine();
boolean check = s.contains(x);
if (check){
System.out.println("There is a substring '" + (x.toUpperCase()) + "' in the sentence");
}
else
System.out.println("There is no substring '" + x + "' in the sentence");
System.out.println("\nThe entered sentence in uppercase characters.");
System.out.println(s.toUpperCase());
}