The code will fail to compile.
0 will be written to the standard output.
1 will be written to the standard output.
2 will be written to the standard output.
3 will be written to the standard output.
第1题:
public class Foo { public void main (String args) { system.out.printIn(“Hello World.”); } } What is the result? ()
第2题:
Which of the following best describes what is meant by Linux Affinity on AIX?()
第3题:
String foo = “blue”; Booleanbar = new Boolean [1]; if (bar[0]) { foo = “green”; } What is the result?()
第4题:
Given the following directory structure: bigProject |--source ||--Utils.java| |--classes |-- And the following command line invocation: javac -d classes source/Utils.java Assume the current directory is bigProject,what is the result?()
第5题:
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.
第6题:
The program prints “0”.
The program prints “4”.
The program prints “8”.
The program prints “12”.
The code does not compile.
第7题:
If the compile is successful, Utils.class is added to the source directory.
The compiler returns an invalid flag error.
If the compile is successful, Utils.class is added to the classes directory.
If the compile is successful, Utils.class is added to the bigProject directory.
第8题:
The ability to install a Linux system on an AIX system
The ability to install an AIX system on a Linux system
The ability to compile and run a Linux application on AIX
The ability to compile and run an AIX application on Linux
第9题:
It is true that j==i.
It is false that j==i.
An exception is thrown at runtime.
Compilation fails because of an error in line 13.
第10题:
The code compiles and “s=” is printed.
The code compiles and “s=null” is printed.
The code does not compile because string s is not initialized.
The code does not compile because string s cannot be referenced.
The code compiles, but a NullPointerException is thrown when toString is called.
第11题:
Foo has the value “”
Foo has the value null
An exception is thrown
The code will not compile
第12题:
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); } }
第13题:
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); } }
第14题:
int index = 1; String [] test = new String[3]; String foo = test[index]; What is the result?()
第15题:
The code will deadlock.
The code may run with output "2 0 6 4".
The code may run with no output.
The code may run with output "0 6".
An exception is thrown at runtime.
The code may run with output "0 2 4 6".
第16题:
Foo has the value of “”
Foo has the value of null.
Foo has the value of “blue”
Foo has the value of “green”
An exception is thrown.
The code will not compile.
第17题:
foo has the value””
foo has the value null.
An exception is thrown.
The code will not compile.
第18题:
The program will terminate with an ArrayIndexOutOfBoundsException.
The program will terminate with a NullPointerException.
4 will be written to standard output.
6 will be written to standard output.
7 will be written to standard output.
第19题:
The program runs and prints nothing.
The program runs and prints “Finally”
The code compiles, but an exception is thrown at runtime.
The code will not compile because the catch block is missing.
第20题:
An exception is thrown.
The code does no compile.
“Hello World.” Is printed to the terminal.
The program exits without printing anything.
第21题:
Foo has the value “”
Foo has the value null
An exception is thrown
The code will not compile
第22题:
2
4
8
16
The code will not compile.