欢迎来到易学考试网 易学考试官网
全部科目 > Java认证考试 > SCJP程序员认证考试

填空题

1. public class test { 
2. public static string output = “” 
3.   
4. public static void foo(int i) { 
5. try { 
6. if(i= =1) { 
7. throw new Exception (); 
8. } 
9. output += “1”; 
10.} 
11. catch(Exception e)  { 
12. output += “2”; 
13. return; 
14.} 
15. finally ( 
16. output += “3”; 
17. ) 
18. output += “4”; 
19. }
20.   
21. public static void main (string args[])  ( 
22. foo(0); 
23. foo(1); 
24.   
25. ) 
26. }
What is the value of the variable output at line 24?()

    【参考答案】

    13423

    点击查看答案

    相关考题

    微信小程序免费搜题
    微信扫一扫,加关注免费搜题

    微信扫一扫,加关注免费搜题