public void test(){
try{
System.out.println();
throw new Exception();
}catch (Exception e){
System.out.println();
throw e;
}
}
上面的代码中会报错:Unhandle Exception: java.lang.Exception
,但是下面的代码却不会
public void test(){
try{
System.out.println();
//throw new Exception();
}catch (Exception e){
System.out.println();
throw e;
}
}
为什么???