Java program to count all vowels in a string.
In the above Java program to count all vowels in a string we use built-in function count() and with the help of a counter variable, calculate each and every vowel. Sample Output: Input the string: welcome To the world of java Number of Vowels in the string: 9