The program will fail to compile.
The program will not terminate normally.
The program will write 10 to the standard output.
The program will write 0 to the standard output.
The program will write 9 to the standard output.
第1题:
class MyThread extends Thread { public void run() { System.out.println(“AAA”); } public void run(Runnable r) { System.out.println(“BBB”); } public static void main(String[] args) { new Thread(new MyThread()).start(); } } What is the result?()
第2题:
public class Foo { public void main (String args) { system.out.printIn(“Hello World.”); } } What is the result? ()
第3题:
A. It is true that j==i.
B. It is false that j==i.
C. An exception is thrown at runtime.
D. Compilation fails because of an error in line 13.
第4题:
String foo = “blue”; Booleanbar = new Boolean [1]; if (bar[0]) { foo = “green”; } What is the result?()
第5题:
Which of the following best describes what is meant by Linux Affinity on AIX?()
第6题:
What will be the result of attempting to run the following program?() public class Qaa75 { public static void main(String args[]) { String[][][] arr = { { {}, null }, { { "1", "2" }, { "1", null, "3" } }, {}, { { "1", null } } }; System.out.println(arr.length + arr[1][2].length); } }
第7题:
What will be the result of attempting to compile and run the following code?() public class Q6b0c { public static void main(String args[]) { int i = 4; float f = 4.3; double d = 1.8; int c = 0; if (i == f) c++; if (((int) (f + d)) == ((int) f + (int) d)) c += 2; System.out.println(c); } }
第8题:
public class foo { public static void main (Stringargs) { String s; system.out.printIn (“s=” + s); } } What is the result?()
第9题:
What will be the result of attempting to compile and run the following program?() public class Q28fd { public static void main(String args[]) { int counter = 0; l1: for (int i=10; i<0; i--) { l2: int j = 0; while (j < 10) { if (j > i) break l2; if (i == j) { counter++; continue l1; } } counter--; } System.out.println(counter); } }
第10题:
int index = 1; String [] test = new String[3]; String foo = test[index]; What is the result?()