My programme has an option of between 1-5
If someone enters a letter like S the code will break how can i stop this. can someone give me the code
I added a
if (ticket > 5) {
JOptionPane.showMessageDialog(null, "Invalid ticket type selected (1-5)");
so if the user inputs 6 it will give him an error as ticket is bigger then 5 but how can i do this with a alphabetical letter thanks