11. String test= “a1b2c3”; 12. String[] tokens = test.split(”//d”); 13. for(String s: tokens) System.out.print(s +“ “); What is the result?()
第1题:
A.Anexceptionisthrownatruntime.
B.1
C.4
D.Compilationfails.
E.0
第2题:
A.abc
B.123
C.a1b2c3
D.a1b2c3
第3题:
A.abc
B.123
C.a1b2c3
D.a1b2c3
E.Compilationfails.
F.Thecoderunswithnooutput.
G.Anexceptionisthrownatruntime.
第4题:
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?()
第5题:
Given: 11.String test = "a1b2c3"; 12.String[] tokens = test.split("//d"); 13.for(String s: tokens) System.out.print(s + " "); What is the result?()
第6题:
A.0
B.1
C.4
D.Compilationfails.
第7题:
int index = 1; String test = new String; String foo = test[index]; What is the result?()
第8题:
A.0
B.1
C.4
D.Compilationfails.
E.Anexceptionisthrownatruntime.
第9题:
public class Test { public static void main(String[] args) { String str = NULL; System.out.println(str); } } What is the result?()
第10题:
12. Date date = new Date(); 13. df.setLocale(Locale.ITALY); 14. String s = df.format(date); The variable df is an object of type DateFormat that has been initialized in line 11. What is the result if this code is run on December 14, 2000?()