题目内容
(请给出正确答案)
[单选题]
下列Scala代码应输出():vara=0;varb=0varsum=0;for(a<-1until3;b<-1until3){sum+=a+b;}println(sum);
A.36
B.35
C.11
D.12
答案
查看答案
A.36
B.35
C.11
D.12
第1题
A)18.0
B)12.0
C)20.0
D)14.0
第3题
A.54
B.45
C.55
D.44
第4题
给定include1.jsp文件代码片断,如下:<%pageContext.setAttribute(“User”,“HAHA”);%>_______//; 给定include2.jsp文件代码片断,如下:<%=pageContext.getAttribute(“User”)%>。要求运行include1.jsp时,浏览器上输出HAHA。要满足以上条件,jsp1.jsp中下划线处应填入以下语句:()
A.<includepage=“include2.jsp”flush=“true”/>
B.<%@includefile=“include2.jsp”%>
C.<jsp:forwordpage=“include2.jsp”/>
D.<%response.sendRedirect(“include2.jsp”);%>
第5题
A.输出0
B.没有静态变量x
C."illegalarraydeclarationsyntax"编译错误
D."possiblereferencebeforeassignment"编译错误
E.产生ArrayIndexOutOfBoundsException异常