8月17日学习日志

1.今天学习了用throws抛出异常。

示例:

public class ThrowsDemo{
    public static void main(String[] args)throws Exception{
        int x=5;
        int y=x/0;
        System.out.println(y);
    }
}

2.没有遇到问题。

3.明天计划学习自定义异常。

posted @ 2020-08-17 18:47  张笑天  阅读(69)  评论(0编辑  收藏  举报