Back To Java Flow of Control Index
//program to input a character and check whether it is a vowel or not using switch statement public class checkvowelswitch { public static void main(String[] args) { char ch; ch='e'; switch(ch) { case 'a': System.out.println("you entered a vowel"); break; case 'e': System.out.println("you entered a vowel"); break; case 'i': System.out.println("you enetred a vowel"); break; case 'o': System.out.println("you enetred a vowel"); break; case 'u': System.out.println("you entered a vowel"); break; default: System.out.println("enter a vowel (a,e,i,o,u)"); } } }