1// There are many ways to do it the one i came up with is this:
2int count = 0;
3String sentence = "My name is DEATHVADER, Hello World!!! XD";
4char[] vowels = {'a', 'e', 'i', 'o', 'u'};
5for (char vowel : vowels)
6 for (char letter : sentence.toLowerCase().toCharArray())
7 if (letter == vowel) count++;
8System.out.println("Number of vowels in the given sentence is " + count);
9
10// I have found another easier method if you guyz don't understand this
11// but this is also easy xD.
12// here you can see another method:
13// https://www.tutorialspoint.com/Java-program-to-count-the-number-of-vowels-in-a-given-sentence