public class ExceptionDemo {
public static void main(String[] args) throws TestException {
try {
Test();
System.out.println("无论如何都不执行");
}
catch (TestException e)
{
throw e;
}
System.out.println("catch中不throw时执行");
}
public static void Test()throws TestException
{
throw new TestException("怎么说");
sout("编译失败")
}
}