vowel or consonant in java using if else

Solutions on MaxInterview for vowel or consonant in java using if else by the best coders in the world

showing results for - "vowel or consonant in java using if else"
Donald
05 Jan 2017
1public class Main{public static void main(String[] args) {char ch = 'e';if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' )System.out.println(ch + " is a vowel");elseSystem.out.println(ch + " is a consonant");}}