diff options
-rw-r--r-- | picker.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/picker.java b/picker.java index d9de0f1..4d12ac3 100644 --- a/picker.java +++ b/picker.java @@ -114,7 +114,11 @@ class Backpointer { case 2: System.out.println("How much money do you have to " + "allocate?"); - priceLimit = Integer.parseInt(scanner.nextLine()); + try { + priceLimit = Integer.parseInt(scanner.nextLine()); + } catch (NumberFormatException e){ + System.out.println("Invalid input - must enter: #"); + } break; case 3: System.out.println(choices); |