Java Test 2222
Java Test 1 2 3 4
Java Test 4 2 4 2
Java Test 4 3 2 1
第1题:
A.JavaTest2222
B.JavaTest1234
C.JavaTest4242
D.JavaTest4321
第2题:
以下是JAVA中正确的入口方法是? ()
第3题:
publicclassTest{publicstaticvoidmain(String[]args){Stringfoo=args[1];Stringbar=args[2];Stringbaz=args[3];System.out.printIn(baz=”+baz);}}Andtheoutput:Baz=2Whichcommandlineinvocationwillproducetheoutput?()
A.JavaTest2222
B.JavaTest1234
C.JavaTest4242
D.JavaTest4321
第4题:
public class Test { public static void main (Stringargs) { String foo = args[1]; String bar = args; String baz = args; System.out.printIn(“baz = ” + baz); } } And the output: Baz = 2 Which command line invocation will produce the output?()
第5题:
public class Test { public static void main (String args) { string foo = “blue”; string bar = foo; foo = “green”; System.out.printIn(bar); } } What is the result?()
第6题:
下面程序执行后,baz的值应是______。 public class Test9 { public static void main(String[] args) { int index = 1; int fox[] = new int [3]; iht bar = fox [index]; int baz = bar + index; System.out.println(baz); } }
A.0
B.1
C.2
D.编译错误
第7题:
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?()
第8题:
publicclassTest{publicstaticvoidmain(String[]args){Stringfoo=args[1];Stringbar=args[2];Stringbaz=args[3];System.out.println(baz=+baz);}}Andthecommandlineinvocation:javaTestredgreenblueWhatistheresult?()
A.baz=
B.baz=null
C.baz=blue
D.Compilationfails.
E.Anexceptionisthrownatruntime.
第9题:
Which declarations will allow a class to be started as a standalone program?()
第10题:
Public class test ( Public static void main (String args[]) ( System.out.printIn (6 ^ 3); ) ) What is the output?()