补货异常代码

package duixiang;

public class test5 {

    public static void main(String[] args) {
        
        try
        {
            int i=2/0;
        }
        //异常
                catch(Exception ex)
                {
                    System.out.println("异常信息="+ex.getMessage());
                }
        System.out.println("继续运行");
    }

}

 

posted @ 2015-12-14 08:52  记忆还是空白  阅读(238)  评论(0编辑  收藏  举报