package java_problems.exception_handling;

import java.util.*;

public class TryCatch {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        try {
            int x = sc.nextInt();
            int y = sc.nextInt();
            int dividend = x / y;
            System.out.println(dividend);
        } catch (InputMismatchException e) {
            System.out.println(e.getClass().getName());
        } catch (ArithmeticException e) {
            System.out.println(e);
        }
        sc.close();
    }
}
Add TryCatch