I am trying to print a letter based on the user's input. So far I have:
System.out.println("Enter an integer from 1 to 26:"); Scanner alpha = new Scanner(System.in); int integer = (char)alpha.nextInt(); char character = (char) integer; System.out.println(character);
For example, if the number 7 was input, the output would be the letter G.
But all this does is print a blank line, can anyone help me with this?