/* Filename: ifToSwitchConversion.java * Description: * This is the original source that will be converted to a switch statement in class */ import java.util.*; public class ifToSwitchConversion { // application entry point public static void main(String [] args) { // Declare a Scanner and a choice variable Scanner stdin = new Scanner(System.in); int choice = 0; System.out.println("Please enter your choice (1-4): "); choice = stdin.nextInt(); if(choice == 1) { System.out.println("You selected 1."); } else if(choice == 2 || choice == 3) { System.out.println("You selected 2 or 3."); } else if(choice == 4) { System.out.println("You selected 4."); } else { System.out.println("Please enter a choice between 1-4."); } } }