JAVA
Hello world! I am a new Java learner and have a doubt regarding one of pro challenge about multiple exception (try/catch); my code works and output the correct answer as per test 2 verification but it tells me that is not a valid answer. I would like just to understand why, for more details here below the details and the code. Thanks a lot for your help! Multiple Exceptions You need to write a divider program which will operate with integers, The program you are given should take two integers as input and execute the division, but we need to handle two exceptions: 1. the divider shouldn't be zero 2. both inputs should be integers. Complete the program to handle them. For the first exception, the program should output "Đrror: division by zero"; and for the second one, "Error: wrong value type". Sample Input 1 b Sample Output Error: wrong value type Use ArithmeticException for first exception and InputMismatchException for the second one. Code: import java.util.Scanner; import java.util.InputMismatchException; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); try { int num1 = scanner.nextInt(); int num2 = scanner.nextInt(); /* 1. Đrror: division by zero 2. Error: wrong value type */ //your code goes here int num3 = num1/num2; System.out.println(num3); } catch(ArithmeticException e1) { System.out.print("Error: division by zero"); } catch(InputMismatchException e2){ System.out.println("Error: wrong value type"); } } }