import java.util.*;
import java.lang.*;
import java.io.*;
public class VowelConsonant {
public static void main(String[] args) {
char ch = 'g';
if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' )
System.out.println(ch + " is vowel");
else
System.out.println(ch + " is consonant");
}
}Java
Program to check whether an alphabet is vowel or consonant.

Written by
View ProfileNikhil Juneja
Passionate software developer and technical contributor at TutorialsLink.
