What I\'m trying to do is if the user clicks on the enter key the program should throw a BadUserInputException. My problem is whenever I press the enter key it just puts me
You need to compare strings with the .equals method, not ==.
.equals
==