import javax.swing.JOptionPane; public class Switch { public static void main(String[] args) { Scanner std = new Scanner(System.in); System.out.println("Please input a digit: "); String input= std.nextLine(); //This is to take in a string and then parse it int digit = Integer.parseInt(input); //int digit = std.nextInt(); - this would be the way to take in an int switch (digit) { case 1: System.out.println("one"); break; case 2: System.out.println("two"); break; case 3: System.out.println("three"); break; default: if(digit>0) System.out.println("Greater than 3");break; } } }