Java Need a Input mismatch exception that will check the inputfor each input with a try catch statement
Here is the code
public static Customer addCustomer() { int cCount = 1; Customer cust = new Customer(cCount++); Scanner scnr = new Scanner(System.in); System.out.println(“Please Enter The Customer’s First Name: “); cust.setFirst(scnr.nextLine()); System.out.println(“Please Enter The Customer’s Last Name: “); cust.setLast(scnr.nextLine()); System.out.println(“Please Enter The Customer’s Phone Number “); cust.setphone(scnr.nextLine()); System.out.println(“Please Enter The Customer’s Buying Preference (New
OR
OR