Suppose the user enters 243.3 at the prompt “Enter quantity:…
Suppose the user enters 243.3 at the prompt “Enter quantity: “. What is the output of the following code? int quantity = 0;try { System.out.print(“Enter quantity: “); quantity = sc.nextInt();}catch (InputMismatchException e) { sc.next(); System.out.println(“Error! Invalid quantity. Try again.\n”); continue;}
Read Details