Back To Java Flow of Control Index
//program to check whether user has entered vowel or not using if-else statement public class checkvowel { public static void main(String[] args) { char ch; ch='a'; if((ch=='a') || (ch=='e') || (ch=='i') || (ch=='o') || (ch=='u')) { System.out.println("you entered a vowel"); } else { System.out.println("you have not entered a vowel"); } } }