so I am collecting information, namely 2 numbers and a string and processing them later on in my code. The numbers work fine and everything will work fine as long as I can get letter to output what letter the user input. Any help much appreciated. Just to be clear, when I say 'not working' I mean letter is blank, and the last line of code outputs :
The letter is
Scanner sc = new Scanner(System.in);
System.out.println("Enter two integers and a Letter ");
int num1 = sc.nextInt();
int num2 = sc.nextInt();
String s = sc.nextLine();
System.out.println("s is of type " + s.getClass().getName()); // s is a String
System.out.println(s); //s has value of this
char letter = s.charAt(0); //Why isn't this working?
System.out.println("The letter is " + letter); //letter isn't showing up