package com.sf._03_throws;

public class Test {
    public static void main(String[] args) throws ArithmeticException {
        method1(1,0);
    }


//    public static void method1(int num, int num1){
//        try{
//            method(num,num1);
//        }catch (Exception e){
//            e.printStackTrace();
//        }
//        System.out.println("后续代码");
//
//    }

    public static void method1(int num, int num1) throws ArithmeticException{
        method(num,num1);
    }

    /**
     * 方法在调用的时候可能会出现除数不为0 的异常
     */
    public static void method(int num  , int num1) throws NullPointerException{
        System.out.println(num / num1);
    }
}
