An exception is thrown at runtime.
r, e, o,
Compilation fails.
r, t, t,
第1题:
Given: 11. String test = "This is a test"; 12. String[] tokens = test.split("/s"); 13. System.out.println(tokens.length); What is the result?()
第2题:
public static void test(String str) { int check = 4; if (check = str.length()) { System.out.print(str.charAt(check -= 1) +“, “); } else { System.out.print(str.charAt(0) + “, “); } } and the invocation: test(”four”); test(”tee”); test(”to”); What is the result?()
第3题:
A.00
B.0001
C.000120
D.00012021
E.Compilation fails.
F.An exception is thrown at runtime.
第4题:
Cat
Dog
Compilation fails.
The code runs with no output.
An exception is thrown at runtime.
第5题:
collie
harrier
Compilation fails.
collie harrier
An exception is thrown at runtime.
第6题:
Runnable r = new Runnable() { public void run() { System.out.print(”Cat”); } }; Threadt=new Thread(r) { public void run() { System.out.print(”Dog”); } }; t.start(); What is the result?()
第7题:
Given: 12. System.out.format("Pi is approximately %d.", Math.PI); What is the result?()
第8题:
A.True
B.Not true
C.An exception is thrown at runtime.
D.Compilation fails because of an error at line 12.
E.Compilation fails because of an error at line 19.
第9题:
r, t, t,
r, e, o,
Compilation fails.
An exception is thrown at runtime.
第10题:
test
Exception
Compilation fails.
NullPointerException