1.6K
In this program we are going to to Check Whether an Alphabet is Vowel or Consonant.
public class VowelConsonant {
public static void main(String[] args) {
char ch = 'a';
if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' )
System.out.println(ch + " is vowel");
else
System.out.println(ch + " is consonant");
}
}
What You get as Output , After running the program
a is vowel
Happy Programming:)