参考答案和解析
参考答案:B
更多“What is the default LSP lifetime value in JUNOS software?() ”相关问题
  • 第1题:

    publicvoidsomeMethod(Objectvalue){12.//checkfornullvalue....20.System.out.println(value.getClass());21.}What,insertedatline12,istheappropriatewaytohandleanullvalue?()

    A.assertvalue==null;

    B.assertvalue!null,“valueisnull”;

    C.if(value==null){thrownewAssertionException(”valueisnull”);

    D.if(value==null){thrownewIllegalArgumentException(”valueisnull”);


    参考答案:D

  • 第2题:

    publicclassSwitchTest{publicstaticvoidmain(String[]args){System.out.println(value=+switchIt(4));}publicstaticintswitchIt(intx){intj=1;switch(x){case1:j++;case2:j++;case3:j++;case4:j++;case5:j++;default:j++;}returnj+x;}}Whatistheresult?()

    A.value=3

    B.value=4

    C.value=5

    D.value=6

    E.value=7

    F.value=8


    参考答案:F

  • 第3题:

    针对下列程序段,需要( )个测试用例才可以满足语句覆盖的要求。
    switch(value){case 0:other=30;break;case 1:other=50;break;case 2:other=300;case 3:other=other/value;break;default:other=other*value;}

    A.2
    B.3
    C.4
    D.5

    答案:C
    解析:
    本题考查白盒测试用例设计方法--语句覆盖法的概念。语句覆盖(Statement Coverage)的含义是:选择足够多的测试数据,使被测程序中的每条语句至少执行一次。

  • 第4题:

    1.publicclassSwitchTest{2.publicstaticvoidmain(String[]args){3.System.out.PrintIn(value=”+switchIt(4));4.}5.publicstaticintswitchIt(intx){6.intj=1;7.switch(x){8.case1:j++;9.case2:j++;10.case3:j++;11.case4:j++;12.case5:j++;13.default:j++;14.}15.returnj+x;16.}17.}Whatistheoutputfromline3?()

    A.Value=3

    B.Value=4

    C.Value=5

    D.Value=6

    E.Value=7

    F.Value=8


    参考答案:F

  • 第5题:

    publicclassSwitchTest{publicstaticvoidmain(Stringargs){System.out.PrintIn(value=”+switchIt(4));}publicstaticintswitchIt(intx){intj=1;switch(x){case1:j++;case2:j++;case3:j++;case4:j++;case5:j++;default:j++;}returnj+x;}}Whatistheoutputfromline3?()

    A.Value=3

    B.Value=4

    C.Value=5

    D.Value=6

    E.Value=7

    F.Value=8


    参考答案:F

  • 第6题:

    1、针对下列程序段,需要()个测试用例才可以满足语句覆盖的要求。 switch (value ) { case 0: other = 30; break; case 1: other = 50; break; case 2: other = 300; case 3: other = other/value; break; default: other = other * value; }

    A.2

    B.3

    C.4

    D.5


    4