import java.io.*; class Prog45 { // Switch statement demonstration, part 3 public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int i; System.out.print("Enter an integer: "); i = Integer.parseInt(in.readLine()); // The switch statement switch (i) { case 1: System.out.println("one"); case 2: System.out.println("two"); case 3: System.out.println("three"); default: System.out.println("something else!"); } } }