下述程序执行后输出结果为(&nbsp&nbsp&nbsp&nbsp...
发布于 2022-03-03 17:20:26
下述程序执行后输出结果为( )。
public class TestMain {
public int test(){
int a = 0
try{
a++
throw new Exception("故意的")
}catch(Exception exa){
a++
return a
}finally{
a++
System.out.println("a1 = "+a)
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
int a = new TestMain().test()
System.out.println("a2 = "+a)
}
}
登录后免费查看答案
关注者
0
被浏览
22