In my program I have multiple readLines for the user to enter in numbers, how would I do a try / catch to catch if they enter something other than a number? Could I just use one throw statement for all of them? Any help appreciated, thanks.
Code:System.out.println("Enter Inventory Number : "); inventoryNumber = Integer.parseInt(reader.readLine());




Reply With Quote