单项选择题

如下的代码段中,如果方法unsafe()正常运行,那么结果是( )。
public void example()
try

unsafe();
System.out.println("Test1");
catch(SafeException e)

System.out.println("Test 2");
finally
System.out.println("Test 3’);

System.out.println("Test 4");

A.Test 3 Test 4
B.Test1 Test3 Test4
C.Test1 Test3
D.Tcst1 Test4
<上一题 目录 下一题>
热门 试题

单项选择题
有如下的代码段,当编译和运行时,下列各选项中说法正确的是( )。 public class Z public static void main(String args[]) new Z (); Z() Z alias1 = this; Z alias2 = this; synchronized(alias1) try alias2.wait(); System.out.println( DONE WAITING ); catch (InterruptedException e) System.out.println( INTERRUPTED ); catch (Exception e) System.out.println( OTHER EXCEPTION ); finally System.out.println ( FINALLY ); System.out.println( ALL DONE );
A.应用程序编译正常,但是不打印任何数据
B.应用程序编译正常,并打印数据“DONE WAITING”
C.应用程序编译正常,并打印数据“FINALLY”
D.应用程序编译正常,并打印数据“ALL DONE”
单项选择题
下列程序的运行结果是( )。 public class Sun public static void main(String args[]) int a=1; int b=1; for(int i=1;i a=a+b; b=b+a; System.out.println(a+ +B) ;
A.6 6
B.5 8
C.13 21
D.34 55
相关试题
  • 下列程序的输出结果为( )。 public cl...
  • 有如下代码段 public class OperatorAnd...