How to check if a vowel is present in a string.

In this program, check if a vowel is present in a string ,so we first ask the user to enter a string using the Scanner class. We then loop through each character in the string and check if it’s a vowel (either lowercase or uppercase). If we find a vowel, we set the vowelPresent variable to true and break out of the loop. Finally, we print a message depending on whether a vowel was found or not.

How to check if a vowel is present in a string. Read More