import java.io.*; class Prog46 { // Switch statement demonstration, part 4 public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); char c; System.out.print("Enter a character: "); c = (char)in.read(); // The switch statement switch (c) { case 'a': case 'b': case 'c': System.out.println("You typed 'a' or 'b' or 'c'"); break; default: System.out.println("You typed something else!"); } } }