int x = 5; switch(x) { case 1: System.out.println("You entered 1"); break; case 2: System.out.println("You entered 2"); break; default: System.out.println("You entered: "+x); }