Given:8.intindex=1:9.Boolean[]test=newboolcan[3];10.boolcanfoo=test[index];Whatistheresult()?A.foohasthevalueof0.B.foohasthevalueofnull.C.foohasthevalueoftrue.D.foohasthevalueoffalse.E.An-exceptionisthrown.F.Thecodewillnotcompile.

题目
Given:8.intindex=1:9.Boolean[]test=newboolcan[3];10.boolcanfoo=test[index];Whatistheresult()?

A.foohasthevalueof0.

B.foohasthevalueofnull.

C.foohasthevalueoftrue.

D.foohasthevalueoffalse.

E.An-exceptionisthrown.

F.Thecodewillnotcompile.


相似考题
更多“Given:8.intindex=1:9.Boolean[]test=newboolcan[3];10.boolcanfoo=test[index];Whatistheresult()? ”相关问题
  • 第1题:

    Given:11.Stringtest="Thisisatest";12.String[]tokens=test.split("\s");13.System.out.println(tokens.length);Whatistheresult?()

    A.0

    B.1

    C.4

    D.Compilationfails.


    参考答案:D

  • 第2题:

    某Internet主页的URL地址为http://www. test. com. cn/product/index.html,该地址的域名是 ______。

    A.index.html

    B.com.cn

    C.www.test.com.cn

    D.http://www.test.com.cn


    正确答案:C
    解析:URL地址是因特网上对资源的统一定位。http://www.test.com.cn/product/index.html表示使用的是超文本传输协议(HTTP),信息资源在域名为www.test.com.cn的主机上,访问的是product文件夹下的一个文件index.html。

  • 第3题:

    新建一个index.jsp页面(位于test项目WebContent目录下的jsp文件夹),然后将test项目发布到Tomcat中并启动项目,请问在浏览器上输入下列哪个地址可以正常访问index.jsp页面()(在本机上并使用默认端口号)

    A.http://localhost/test/index.jsp

    B.http://localhost:8080/test/WebContent/index.jsp

    C.http://localhost:8080/test/WebContent/jsp/index.jsp

    D.http://localhost:8080/test /index.jsp


    http://localhost:8080/test/WebContent/jsp/index.jsp

  • 第4题:

    Given:11.Stringtest="a1b2c3";12.String[]tokens=test.split("\\d");13.for(Strings:tokens)System.out.print(s+"");Whatistheresult?()

    A.abc

    B.123

    C.a1b2c3

    D.a1b2c3


    参考答案:A

  • 第5题:

    设有以下程序,其运行输出结果为? class Test{ Test(int i) { System.out.println("Test(" +i +")"); } } public class Q12 { static Test t1 = new Test(1); Test t2 = new Test(2); static Test t3 = new Test(3); public static void main(String[ ] args){ Q12 Q = new Q12(); } }

    A.Test(1) Test(2) Test(3)

    B.Test(3) Test(2) Test(1)

    C.Test(2) Test(1) Test(3)

    D.Test(1) Test(3) Test(2)


    7