[code="java"]
public class ClassA {
public ClassA()throws Exception{
// TODO Auto-generated constructor stub
try{
throw new RuntimeException("bbbbbbbbbb");
}catch(RuntimeException e){
throw new Exception("cccccccc"+ e.getMessage(),e);
}
}
}
[/code]
[code="java"]
public class CatchExceptionTest {
public static void main(String[] args){
try{
Class throttleClass = Class.forName("ClassA");
Constructor c = throttleClass.getConstructor();
ClassA a = (ClassA)c.newInstance();
}catch(RuntimeException ee){
System.out.println("11111111");
System.out.println(ee.getMessage());
}catch(Exception e){
System.out.println("222222222 " + e.toString());
System.out.println(e.getMessage());
}
}
}
[/code]
求主方法执行的结果, 以及出现的原因。。。