编辑代码

class Main {
	public static void main(String[] args)
          throws java.io.IOException {
          char choice;
		System.out.println("help on");
        System.out.println("1 if");
        System.out.println("2 switch");
        System.out.println("choose one");
        choice=(char) System.in.read();
        System.out.println("\n");
        switch(choice){
            case '1':
            System.out.println("the if\n");
            System.out.println("if condition statement");
            System.out.println("else statement");
            break;
            case '2':
            System.out.println("the switch\n");
            System.out.println("switch expression");
            System.out.println("state sequence");
            System.out.println("break");
            break;
            default:
            System.out.print("slection not found");
        }
	}
}