Hi so I have this code:
`int option;
while(true) {
try { //If its a number
option = Integer.parseInt(input.nextLine());
if (option == 1 || option == 2 || option == 3 || option == 4 || option == 5 ) {
break; // Valid input, exit the loop
} else { //If its a wrong number
System.out.println("Invalid choice. Please enter a number between 1 and 5:");
}
} catch (NumberFormatException e) { //If input is not a number
System.out.println("Invalid choice. Please enter a valid integer:");
}`
When i inputted 2' the program crashed. Shouldn't it be caught by the catch?