class Demo
{
public static void func()//throws Exception
{
try
{
throw new Exception();
}
finally
{
System.out.println("B");
}
}
public static void main(String[] args)
{
try
{
func();
System.out.println("A");
}
catch(Exception e)
{
System.out.println("C");
}
System.out.println("D");
}
}
蓝色的语句不是执行不到吗?为什么能编译通过啊?
|
|