单项选择题
public class test(
public static void main(string[]args){
string foo = args [1];
string foo = args [2];
string foo = args [3];
}
)
And command line invocation: Java Test red green blue
What is the result?()
A. Baz has the value of “”
B. Baz has the value of null
C. Baz has the value of “red”
D. Baz has the value of “blue”
E. Bax has the value of “green”
F. The program throws an exception.
相关考题
-
单项选择题
int index = 1; boolean[] test = new Boolean[3]; boolean foo= test [index]; What is the result?()
A. Foo has the value of 0.
B. Foo has the value of null.
C. Foo has the value of true.
D. Foo has the value of false.
E. An exception is thrown.
F. The code will not compile. -
多项选择题
WhichtwostatementsarereservedwordsinJava?()
A. Run
B. Import
C. Default
D. Implement -
单项选择题
//point X public class foo ( public static void main (String[]args) throws Exception { printWriter out = new PrintWriter (new java.io.outputStreamWriter (System.out), true; out.printIn(“Hello”); } ) Which statement at PointX on line 1 allows this code to compile and run?()
A. Import java.io.PrintWriter;
B. Include java.io.PrintWriter;
C. Import java.io.OutputStreamWriter;
D. Include java.io.OutputStreamWriter;
E. No statement is needed.
