Java Catch 小知识

来源:互联网 发布:网络短信平台软件 编辑:程序博客网 时间:2024/06/03 05:21
public class ExceptionApp {    public static void main(String[] args) {        try {            System.out.println(1 / 0);        } catch (Exception e) {        } finally {            System.out.println("finally");        }        try {            System.out.println(1 / 0);        } finally {            System.out.println("finally");        }    }}


没有Catch 模块,错误会被抛出 导致程序中断

0 0
原创粉丝点击