My code wont execute
Im having issues with writing this properly since the lesson on multiple exceptions did not teach me how to write other exceptions besides basic ones. 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 divide=num1/num2; } catch(ExceptionType1 e1) { throws ArithmeticException { if(num1==0||num2==0) { throw new ArithmeticException("Error: division by zero"); } } } catch(ExceptionType2 e2) { throws InputMismatchException { if(num1!=(int)num1||num2!=(int)num2) { throw new InputMismatchException("Error: wrong value type"); } } } } }