填空题
当下面程序的输入是“1234”时,程序的输出是( );当下面程序的输入是“123”时,程序的输出是( )。将下面程序的第23~26行删去之后,则当下面程序的输入是“1234”时,程序的输出是 1;当下面程序的输入是“1 2 3”时,程序的输出是 2。
01.class J_Test
02.{
03. public static void main(String args[])
04. {
05. try
06. {
07. mb_methodl(args);
08. }
09. catch(Exception e)
10. {
11. System.out.print('m');
12. }
13. System.out.print('n');
14. }/ /方法main结束
15.
16. static void mb methodl(String a[])
17. {
18. try
19. {
20. mb_method2(a);
21. System.out. print("a");
22. }
23. catch(Exception e)
24. {
25. System.out.print("b");
26. }
27. finally
28. {
29. System. out. print("c");
30. }
31. System.out.print("d");
32. }/ /方法mb_methodl结束
33.
34. static void mb_ method2(String a[])
35. {
36. System. out.println(a[a.length]);
37. }/ /方法mb_method2结束
38.
39.}/ /类J_Test结束
【正确答案】
1、bcdn bcdn cmn cmn
【答案解析】