CMS专题

单选题Given: 1. 3.${5 + 3 lt 6} 4.${requestScope[’foo’][0] ne 10 div 0} 5. ${10 div 0} What is the result?()A True trueB False trueC False true 0D True true InfinityE False true Infinity

题目
单选题
Given: 1. 3.${5 + 3 lt 6} 4.${requestScope[’foo’][0] ne 10 div 0} 5. ${10 div 0} What is the result?()
A

True true

B

False true

C

False true 0

D

True true Infinity

E

False true Infinity

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

classTestApp{publicstaticvoidmain(String[]args){System.out.println(multiply(2,3,4,5));}publicintmultiply(int...nums){intresult=1;for(intx:nums)result*=x;returnresult;}}程序运行后的输出是哪项?()

A.120

B.24

C.14

D.编译错误


参考答案:D

第2题:

Given:Which method will complete this class?()

A.public int compareTo(Object o){/*more code here*/}

B.public int compareTo(Score other){/*more code here*/}

C.public int compare(Score s1,Score s2){/*more code here*/}

D.public int compare(Object o1,Object o2){/*more code here*/}


参考答案:B

第3题:

Given:6.<%int[]nums={42,420,4200};7.request.setAttribute("foo",nums);%>Whichtwosuccessfullytranslateandresultinavalueoftrue?()

A.${trueorfalse}

B.${requestScope[foo][0]>500}

C.${requestScope[’foo’][1]=420}

D.${(requestScope[’foo’][0]lt50)&&(3gt2)}


参考答案:A, D

第4题:

Given the element from the web application deployment descriptor: /main/page1.jsp true and given that /main/page1.jsp contains: <% int i = 12; %> <%= i %>  What is the result?()

  • A、<b></b>
  • B、<b>12</b>
  • C、The JSP fails to execute.
  • D、<% int i = 12 %><b><%= i %></b>

正确答案:C

第5题:

程序:  class  TestApp{  public static void main(String[] args){  System.out.println(multiply(2,3,4,5));  }  public int multiply(int[] nums){       int result = 1;       for(int x :nums)           result *= x;       return result;   } }  程序运行后的输出是哪项?() 

  • A、 14
  • B、 编译错误
  • C、 120
  • D、 24

正确答案:C

第6题:

classTestApp{publicstaticvoidmain(String[]args){System.out.println(multiply(2,3,4,5));}publicintmultiply(int…nums){intresult=1;for(intx:nums)result*=x;//result=result*x;returnresult;}}2、6、24、120程序运行后的输出是哪项?()

A.14

B.编译错误

C.120

D.24


参考答案:C

第7题:

Given:Which code, inserted at line 15, allows the class Sprite to compile?()

A.Foo { public int bar() { return 1; }

B.new Foo { public int bar() { return 1; }

C.new Foo() { public int bar() { return 1; }

D.new class Foo { public int bar() { return 1; }


参考答案:C

第8题:

Given:1.<%int[]nums={42,420,4200};2.request.setAttribute("foo",nums);%>3.${5+3lt6}4.${requestScope[’foo’][0]ne10div0}5.${10div0}Whatistheresult?()

A.Truetrue

B.Falsetrue

C.Falsetrue0

D.TruetrueInfinity

E.FalsetrueInfinity


参考答案:E

第9题:

class TestApp{   public static void main(String[] args){   System.out.println(multiply(2,3,4,5));  }   public int multiply(int… nums){   int result = 1;   for(int x :nums)   result *= x;  //result =result*x;   return result;  }  }   2、6、24、120   程序运行后的输出是哪项?()  

  • A、 14
  • B、 编译错误
  • C、 120
  • D、 24

正确答案:C

第10题:

Given: 6.<% int[] nums = {42, 420, 4200}; 7.request.setAttribute("foo", nums); %> Which two successfully translate and result in a value of true?()

  • A、${true or false}
  • B、${requestScope[foo][0] > 500}
  • C、${requestScope[’foo’][1] = 420}
  • D、${(requestScope[’foo’][0] lt 50) && (3 gt 2)}

正确答案:A,D

更多相关问题