- class Exc0 extends Exception{}
- class Exc1 extends Exc0{}
- class Demo
- {
- public static void main(String[] args)
- {
- try
- {
- throw new Exc1();
- }
- catch(Exception e)
- {
- System.out.println("Exception");
- }
- catch(Exc0 e)
- {
- System.out.println("Exc0");
- }
- }
- }
复制代码 求大神帮我分析一下代码执行过程,对异常比较晕。 |
|