0
1
4
Compilation fails.
第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题:
Given: 11. String test = "This is a test"; 12. String[] tokens = test.split("/s"); 13. System.out.println(tokens.length); What is the result?()
第5题:
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题:
public class Test { public static void main(String [] args) { boolean assert = true; if(assert) { System.out.println(”assert is true”); } } } Given: javac -source 1.3 Test.java What is the result?()
第8题:
A.0
B.1
C.4
D.Compilationfails.
E.Anexceptionisthrownatruntime.
第9题:
package test1; public class Test1 { static int x = 42; } package test2; public class Test2 extends test1.Test1 { public static void main(String[] args) { System.out.println(“x = “ + x); } } What is the result?()
第10题:
Given: 11.String test = "a1b2c3"; 12.String[] tokens = test.split("//d"); 13.for(String s: tokens) System.out.print(s + " "); What is the result?()