42
420
462
42042
Compilation fails.
An exception is thrown at runtime.
第1题:
A.42
B.420
C.462
D.42042
E.Compilation fails.
F.An exception is thrown at runtime.
第2题:
String a = “ABCD”; String b = a.toLowerCase(); b.replace(‘a’, ‘d’); b.replace(‘b’, ‘c’); System.out.println(b); What is the result? ()
第3题:
A.Compilation fails.
B.ClassC is displayed.
C.The code runs with no output.
D.An exception is thrown at runtime.
第4题:
collie
harrier
Compilation fails.
collie harrier
An exception is thrown at runtime.
第5题:
String a = null; a.concat(“abc”); a.concat(“def”); System.out.println(a); What is the result?()
第6题:
public class TestString 1 { public static void main(String[] args) { String str = “420”; str += 42; System.out.print(str); } } What is the output?()
第7题:
public classYippee{ public static void main(String[]args){ for(intx=1;xSystem.out.print(args[x]+""); } } } and two separate command line invocations:j avaYippee javaYippee1234 What is the result?()
第8题:
A.00
B.0001
C.000120
D.00012021
E.Compilation fails.
F.An exception is thrown at runtime.
第9题:
42
420
462
42042
Compilation fails.
An exception is thrown at runtime.
第10题:
r, t, t,
r, e, o,
Compilation fails.
An exception is thrown at runtime.