题目内容:
给出一段程序,试判断哪个是正确的结果( )public class rtExcept{
public static void throwit(){
System.out.print(“throwit”);
throw new RuntimeException();
}
public static void main(String [] aa){
try{
System.out.print(“hello “);
throwit(); }
catch(Exception re){
System.out.print(“caught ”); }
finally{
System.out.print(“finally ”); }
System.out.print(“after ”);
}
} A.hello throwit caught
B.hello throwit caught finally after
C.hello throwit RuntimeException after
D.hello throwit caught finally after RuntimeException
参考答案:
答案解析: