黑马程序员技术交流社区

标题: 写出结果 [打印本页]

作者: DreamStart    时间: 2015-8-4 21:02
标题: 写出结果
class Exc0 extends Exception{}
class Exc1 extends Exc0{}

class Demo
{
        public static void main(String[] args)
        {
                try
                {
                        throw new Exc1();
                }               
                catch(Exception e)
                {
                }
                catch(Exc0 e)
                {
                        System.out.println("Exc0");
                }
        }
}






欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2