Basically in my switch case, I'm trying to get it so if a String is typed in I want to return a message saying "Please enter an integer". I've tried using the try { } catch { } to do this but what happens is that in some of my switch-cases, I take in String inputs and after these String inputs have been taken in and a message printed out. It prints "Please enter an integer".
How can I fix this?