Last Updated: 17 July, 2022
On this tutorial page we are going to learn how to write a Java program to check whether the character is a vowel or consonant.
Among the alphabets, A, E, I, O and U (smallcase and uppercase) are known as vowels, while the rest of the alphabets are known as consonants.
Vowels: A, E, I, O, U
Consonants: B, C, D, F, G, H, J, K, L, M, N, P, Q, R, S, T, V, W, X, Y, Z
Let's see the Java program implementation.
Output
K is a consonant character.
e is a vowel character.
Output 1 :
Enter a character : e
e is a vowel character.
Output 2 :
Enter a character :R
R is a consonant character.
Output
K is a consonant character.
e is a vowel character.
Output
K is a consonant character.
e is a vowel character.
That's all guys, hope this Java Program is helpful for you.
Happy Learning... 😀
feedback@javabytechie.com