Java Program to check a Character is Vowel or Consonant

In this post, we will see how to check a Character is Vowel or Consonant.
You just need to check if character is part of set {a,A,e,E,i,I,o,O,u,U}.If it is part of set then it is Vowel else Consonant.

Output:

Enter an Alphabet : g
g is a Consonant

That’s all about Java Program to Check a Character is Vowel or Consonant.

Was this post helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *