int menuChoice; // ... switch (menuChoice) { case 1: System.out.println("You chose number 1."); break; case 2: System.out.println("You chose number 2."); break; case 3: System.out.println("You chose number 3."); break; default: // GOOD: 'default' case for invalid choices System.out.println("Sorry, you made an invalid choice."); break; }