Java Need Input Mismatch Exception Check Input Input Try Catch Statement Code Public Stati Q37068302

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

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.