单选题Given: What is the result?()A nullB finallyC null finallyD Compilation fails.E finally exception

单选题
Given: What is the result?()
A

null

B

finally

C

null finally

D

Compilation fails.

E

finally exception


参考解析

解析: 暂无解析

相关考题:

staticvoidtest(){try{Stringx=null;System.out.print(x.toString()+);}finally{System.out.print(finally);}}publicstaticvoidmain(String[]args){try{test();}catch(Exceptionex){System.out.print(”exception);}}Whatistheresult?()A.nullB.finallyC.nullfinallyD.Compilationfails.E.finallyexception

public static void main(String[] args) {  String str = “null‟;  if (str == null) {  System.out.println(”null”);  } else (str.length() == 0) {  System.out.println(”zero”);  } else {  System.out.println(”some”);  }  }  What is the result?()A、 nullB、 zeroC、 someD、 Compilation fails.E、 An exception is thrown at runtime.

Given:   11. String test = "This is a test";   12. String[] tokens = test.split("/s");   13. System.out.println(tokens.length);   What is the result?()A、 An exception is thrown at runtime.B、 1C、 4D、 Compilation fails.E、 0

public class Test {  public static void main(String[] args) {  String str = NULL;  System.out.println(str);  }  }   What is the result?()  A、 NULLB、 Compilation fails.C、 The code runs with no output.D、 An exception is thrown at runtime.

static void test() {  try {  String x=null;  System.out.print(x.toString() +“ “);  }  finally { System.out.print(“finally “); }  }  public static void main(String[] args) {  try { test(); }  catch (Exception ex) { System.out.print(”exception “); }  }  What is the result?() A、 nullB、 finallyC、 null finallyD、 Compilation fails.E、 finally exception

public class Test {  public static void aMethod() throws Exception {  try {  throw new Exception(); } finally {  System.out.println(“finally”);  }  }  public static void main(String args[]) {  try {  aMethod();  } catch (Exception e) {  System.out.println(“exception”);  }  System.out.println(“finished”);  }  }  What is the result?()  A、 finallyB、 exception finishedC、 finally exception finishedD、 Compilation fails.

System.out.println(Math.sqrt(-4D));  What is the result?()  A、 –2B、 NaNC、 InfinityD、 Compilation fails.E、 An exception is thrown at runtime.

String a = null;  a.concat(“abc”);  a.concat(“def”);  System.out.println(a);   What is the result?()  A、 abcB、 nullC、 abcdefD、 Compilation fails.E、 The code runs with no output.F、 An exception is thrown at runtime.

Given: String[] elements = { "for", "tea", "too" }; String first = (elements.length  0) ? elements[0] : null; What is the result?()A、Compilation fails.B、An exception is thrown at runtime.C、The variable first is set to null.D、The variable first is set to elements[0].

单选题static void test() {  try {  String x=null;  System.out.print(x.toString() +“ “);  }  finally { System.out.print(“finally “); }  }  public static void main(String[] args) {  try { test(); }  catch (Exception ex) { System.out.print(”exception “); }  }  What is the result?()A nullB finallyC null finallyD Compilation fails.E finally exception

单选题Given: What is the result?()A collieB harrierC Compilation fails.D collie harrierE An exception is thrown at runtime.

单选题Given: What is the result?()A r, t, t,B r, e, o,C Compilation fails.D An exception is thrown at runtime.

单选题Given: What is the result?()A BB B, followed by an Exception.C Compilation fails due to an error on line 9.D Compilation fails due to an error on line 14.E An Exception is thrown with no other output.

单选题String a = null;  a.concat(“abc”);  a.concat(“def”);  System.out.println(a);   What is the result?()A abcB nullC abcdefD Compilation fails.E The code runs with no output.F An exception is thrown at runtime.

单选题Given: What is the result?()A TestAB TestBC Compilation fails.D An exception is thrown at runtime.

单选题Given: What is the result?()A  An exception is thrown at runtime.B  int LongC  Compilation fails.D  Short Long

单选题Given:   11. String test = "This is a test";   12. String[] tokens = test.split("/s");   13. System.out.println(tokens.length);   What is the result?()A An exception is thrown at runtime.B 1C 4D Compilation fails.E 0

单选题Given: What is the result?()A peepB barkC meowD Compilation fails.E An exception is thrown at runtime.

单选题Given: What is the result?()A CanadaB null CanadaC Canada nullD Canada CanadaE Compilation fails due to an error on line 26.

单选题public static void main(String[] args) {  String str = “null‟;  if (str == null) {  System.out.println(”null”);  } else (str.length() == 0) {  System.out.println(”zero”);  } else {  System.out.println(”some”);  }  }  What is the result?()A nullB zeroC someD Compilation fails.E An exception is thrown at runtime.

单选题System.out.println(Math.sqrt(-4D));  What is the result?()A –2B NaNC InfinityD Compilation fails.E An exception is thrown at runtime.

单选题Given: What is the result?()A X, followed by an Exception.B No output, and an Exception is thrown.C Compilation fails due to an error on line 14.D Compilation fails due to an error on line 16.E Compilation fails due to an error on line 17.

单选题Given: What is the result?()A An Exception is thrown with no other outputB followed by an ExceptionC Compilation fails due to an error on line 9D Compilation fails due to an error on line 14

单选题public class Test {  public static void aMethod() throws Exception {  try {  throw new Exception(); } finally {  System.out.println(“finally”);  }  }  public static void main(String args[]) {  try {  aMethod();  } catch (Exception e) {  System.out.println(“exception”);  }  System.out.println(“finished”);  }  }  What is the result?()A finallyB exception finishedC finally exception finishedD Compilation fails.

单选题Given: What is the result?()A 7B 49C 343D Compilation fails.E An exception is thrown at runtime.

单选题public class Test {  public static void main(String[] args) {  String str = NULL;  System.out.println(str);  }  }   What is the result?()A NULLB Compilation fails.C The code runs with no output.D An exception is thrown at runtime.

单选题Given: What is the result?()A 1B 2C 12D Compilation fails.E No output is produced.F An exception is thrown at runtime.