The formatting of the if statement is hard to understand. Also some comments would make it easier to understand. Here's a rewrite:
// don't consume: digit,...
Type: Posts; User: Norm
The formatting of the if statement is hard to understand. Also some comments would make it easier to understand. Here's a rewrite:
// don't consume: digit,...
Try adding a println() statement that prints out the value of input. Then execute the code and press all the keys one at a time to see what is passed to the variable: input. I don't think...
Can you give some more details on where you are having problems? What is the "that" you refer to?
No, there is one that has the value 'n'.
Did you look at the values of the static KeyEvent variables that the code uses? Which one of them had the value: (int)'n'?
The KeyEvent values are int, not char. Look at their values and see if (int)'n' is one of them.
Can you make a small, complete program that compiles, executes and shows the problem?