int number = 2; switch (number) { case 1: System.out.print("One"); break; case 2: System.out.print("Two"); case 3: System.out.print("Three"); } .