外语jsp+js+servlet+sql测试.docx
- 文档编号:23744756
- 上传时间:2023-05-20
- 格式:DOCX
- 页数:19
- 大小:21.86KB
外语jsp+js+servlet+sql测试.docx
《外语jsp+js+servlet+sql测试.docx》由会员分享,可在线阅读,更多相关《外语jsp+js+servlet+sql测试.docx(19页珍藏版)》请在冰豆网上搜索。
外语jsp+js+servlet+sql测试
答题统计:
共30道题,总分30分
答对14道,得14分,答题用时29分钟
基本技能
JavaScript:
3/4
JavaSE-Basic:
4/7
JSP:
3/7
Servlet:
2/8
SQL&RDB:
2/4
答题明细:
第1题
题目ID:
7648
题目分类:
JavaScript
Whatisthevalueofiafterthefollowingforloop?
for(vari=0;i<2;i++){
//Donothing
}
//Whatisthevalueofihere?
∙A.
undefined
∙B.
0
∙C.
1
∙D.
2
你选的答案:
D
测试结果:
第2题
题目ID:
5135
题目分类:
JavaScript
WherecanweinsertJavaScriptcode?
∙A.
Inthe
tag.∙B.
Inthe
tag.∙C.
Intheboth
andtags.你选的答案:
C
测试结果:
第3题
题目ID:
5843
题目分类:
JavaScript
Whichofthefollowingistrue?
∙A.
Ifonkeydownreturnsfalse,thekey-presseventiscancelled.
∙B.
Ifonkeypressreturnsfalse,thekey-downeventiscancelled.
∙C.
Ifonkeydownreturnsfalse,thekey-upeventiscancelled.
∙D.
Ifonkeypressreturnsfalse,thekey-upeventiscanceled.
你选的答案:
A
测试结果:
第4题
题目ID:
1805
题目分类:
JavaScript
ChooseallthevalidmethodsofMathobject.
∙A.
abs
∙B.
add
∙C.
floor
∙D.
max
∙E.
mod
∙F.
alloftheabove
你选的答案:
CF
测试结果:
第5题
题目ID:
10549
题目分类:
JavaSE-Basic
WhichofthefollowingcollectionsareThreadSafe?
∙A.
Hashtable
∙B.
Map
∙C.
ConcurrentHashMap
∙D.
ArrayList
你选的答案:
AC
测试结果:
第6题
题目ID:
10764
题目分类:
JavaSE-Basic
Whichabstractclassisthesuperclassofallstreamclassesusedforreadingbytes?
∙A.
Reader
∙B.
FileReader
∙C.
ByteReader
∙D.
InputStream
∙E.
FileInputStream
你选的答案:
A
测试结果:
第7题
题目ID:
10520
题目分类:
JavaSE-Basic
Whatare(roughly)themaindifferencesbetweenaHashMapandaHashtable?
∙A.
HashMapkeysdonotneedtoimplementtheComparableinterface
HashtablekeysmustimplementtheComparableinterface
∙B.
HashMappermitsnullvalues
Hashtabledoesnotpermitnullvalues
∙C.
HashMapisnotsynchronized
Hashtableissynchronized
∙D.
HashMapimplementstheMapinterface
HashtableimplementstheSortedMapinterface
∙E.
HashMapcanbeinstantiatedwithaninitialcapacity
Hashtablecannotbeinstantiatedwithaninitialcapacity
你选的答案:
CD
测试结果:
第8题
题目ID:
9940
题目分类:
JavaSE-Basic
Whichencodingisusedwhenreading/writingaPropertiesobjectfrom/toaline-orientedfile?
∙A.
UTF-8
∙B.
ISO8859-1
∙C.
ISO8859-15
∙D.
Thesystemdefaultencoding
你选的答案:
B
测试结果:
第9题
题目ID:
10529
题目分类:
JavaSE-Basic
Whichstatementsaretrueabouttheexpression((int)(Math.random()*4))?
Selectthethreecorrectanswers.
∙A.
Itmayevaluatetoanegativenumber
∙B.
Itmayevaluatetothenumber0
∙C.
Theprobabilityofitevaluatingtothenumber1orthenumber2isthesame
∙D.
Itmayevaluatetothenumber3
∙E.
Itmayevaluatetothenumber4
你选的答案:
ABC
测试结果:
第10题
题目ID:
10755
题目分类:
JavaSE-Basic
Whichofthepatternsmatchtheword"Java"exactly5times?
∙A.
Java{5}
∙B.
Java{5,}
∙C.
Java[5]
∙D.
(Java){5}
∙E.
(Java){5,}
∙F.
(Java)[5]
你选的答案:
D
测试结果:
第11题
题目ID:
10558
题目分类:
JavaSE-Basic
Whichofthefollowingkindsofloopsalwaysexecutesatleastonce?
∙A.
for
∙B.
while
∙C.
do-while
∙D.
Noneoftheabove.
你选的答案:
C
测试结果:
第12题
题目ID:
12004
题目分类:
JSP
WhichisNOTanimplicitobjectinaJSP:
∙A.
exception
∙B.
pageContext
∙C.
pageConfig
∙D.
application
你选的答案:
D
测试结果:
第13题
题目ID:
12057
题目分类:
JSP
1:
<%
2:
for(inti=0;i<3;++i){
3:
%>
4:
out.print(i);
5:
<%
6:
}
7:
%>
WhatistheoutputoftheaboveJSPfragment?
∙A.
012
∙B.
123
∙C.
nullnullnull
∙D.
out.print(i);out.print(i);out.print(i);
你选的答案:
D
测试结果:
第14题
题目ID:
11960
题目分类:
JSP
WhichofthefollowingJSPvariablesisnotavailablewithinaJSPexpression?
∙A.
out
∙B.
session
∙C.
request
∙D.
response
∙E.
httpsession
∙F.
page
你选的答案:
E
测试结果:
第15题
题目ID:
11955
题目分类:
JSP
Isthereawaytoreference this
variablewithinaJSPpage?
∙A.
Yes,thepageimplicitobjectisequivalentto"this"andreturnsareferencetotheservletgeneratedbytheJSPpage
∙B.
Yes,therequestimplicitobjectisequivalentto"this"andreturnsareferencetotheservletgeneratedbytheJSPpage
∙C.
No
你选的答案:
C
测试结果:
第16题
题目ID:
12016
题目分类:
JSP
AJSPpagecontainsthefollowingline:
outvalue="${notfound}"/>
outvalue="${notfound}"/>
Whatwillbetheoutputifnotfounddoesnotexistinanyscope?
∙A.
null
∙B.
∙C.
notfound
∙D.
anexceptionwillbethrown
你选的答案:
D
测试结果:
第17题
题目ID:
11956
题目分类:
JSP
WhichofthefollowingisacorrectdeclarationofJSP?
∙A.
<%!
inti=0;%>
∙B.
<%inti=0;%>
∙C.
<%=inti=0;%>
∙D.
<%@inti=0;%>
∙E.
--inti=0;-->
∙F.
<%--inti=0;--%>
你选的答案:
B
测试结果:
第18题
题目ID:
12062
题目分类:
JSP
Whichofthefollowingiscorrectsyntaxtoforwardtherequesttoanotherpage?
∙A.
<%!
forwardpage="HelloWorld.jsp"/>
∙B.
forwardpage="HelloWorld.jsp"/> ∙C. forward jsp="HelloWorld.jsp"/> ∙D. <%@page: forwardpage="HelloWorld.jsp"%> 你选的答案: B 测试结果: 第19题 题目ID: 11871 题目分类: Servlet WhatHTTPmethodisusedwhenthisformissubmitted? ∙A. GET ∙B. TRACE ∙C. HEAD ∙D. POST 你选的答案: A 测试结果: 第20题 题目ID: 11715 题目分类: Servlet SupposewewrotethefollowingregistrationServlet.SupposefurtherthemethodperformRegistration()willproducetherequiredmarkupforawelcomepageandwillnotthrowanyExceptions.Afterweproducedthemarkupwesendawelcome-email.sendEmail()willreturntrueonsuccessandfalseonerror(wrongemailaddress). sendEmail()willnotthrowanyExceptions. //...someimports... publicclassRegistrationServletextendsHttpServlet{ protectedvoiddoGet(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{ PrintWriterout=response.getWriter(); performRegistration(request,response); out.flush(); if(! sendEmail()){ response.sendRedirect("error.jsp"); } } } ∙A. ThiscodemightthrowanIllegalStateException. ∙B. ThiscodemightthrowaBufferAlreadyCommittedException. ∙C. ThiscodewillonlythrowanExceptionifanetworkerroroccurs. ∙D. AccordingtotheServletspecificationit'snotpermittedforServletstosendemails. 你选的答案: D 测试结果: 第21题 题目ID: 11861 题目分类: Servlet HavingthefollowingservletsdefinedinyourDD: whenausertypesthefollowingurl... http: //localhost: 8080/myWebApp/justDoIt.go whichservletwillrun? ∙A. servlet1 ∙B. servlet2 ∙C. firstservlet1,thenservlet2 ∙D. firstservlet2,thenservlet1 ∙E. none,url-mappingscan'toverlap 你选的答案: B 测试结果: 第22题 题目ID: 11792 题目分类: Servlet ImaginerequestcontainsGETparametera="one"andaPOSTparametersa="two"anda="three".Whatwillmethodcall(withreqasaRequestArgumentObject) req.getParameter("a")return? ∙A. one ∙B. two ∙C. three ∙D. IllegalStateExceptionwillbethrown 你选的答案: D 测试结果: 第23题 题目ID: 11799 题目分类: Servlet WhichscopescanbeusedtostoreattributesintheServletbasedapplication: Notation: scopeName(CorrespondingType) ∙A. application(ServletContext) ∙B. request(ServletRequest) ∙C. response(ServletResponse) ∙D. session(HttpSession) ∙E. servletconfig(ServletConfig) 你选的答案: ABCD 测试结果: 第24题 题目ID: 11781 题目分类: Servlet Ifthe"webapp"webapplicationisdeployedontheservletcontainer,howcanweopentheJSPpage/webapp/WEB-INF/jsp/index.jspfromthebrowser? (ChooseanappropriateURL) ∙A. http: //host: port/webapp/ ∙B. http: //host: port/webapp/index.jsp ∙C. http: //host: port/webapp/jsp/index.jsp ∙D. http: //host: port/webapp/WEB-INF/jsp/index.jsp ∙E. Thepagecannotbeopeneddirectlyfromthebrowser. 你选的答案: C 测试结果: 第25题 题目ID: 11722 题目分类: Servlet RegardingcontainerpathsandURL,whichofthefollowingequationsisalwaystrue? Note: Allthenameshavetheirconventionalmeanings. ∙A. requestURI=contextPath+servletPath+pathInfo ∙B. requestURI=contextPath+pathInfo+servletPath ∙C. contextPath=requestURI+servletPath+pathInfo ∙D. servletPath=contextPath+pathInfo 你选的答案: B 测试结果: 第26题 题目ID: 11816 题目分类: Servlet Whichoftheseistrueaboutdeploymentdescriptors.Selecttheonecorrectanswer. ∙A. Theorderofelementsindeploymentdescriptorisimportant.Theelementsmustfollowaspecificorder. ∙B. Theelementsofdeploymentdescriptorarecaseinsensitive. ∙C. Theservlet-mappingelement,ifdefined,mustbeincludedwithintheservletelement. ∙D. Theweb-appelementmustincludetheservletelement. 你选的答案: C 测试结果: 第27题 题目ID: 8132 题目分类: SQL&RDB Giventhetable'DTable'withthefollowingdatainit: Id DESCR 1 'A' 1 'ABC' 1 'BCD' 2 'AA' 2 'XXXAXZ' 2 null 3 null 3 'TTT' 3 'AAA' Whatistheresultsetofthisquery? SELECTId,COUNT(*)AS'Count' FROMDTable WHEREDescrLIKE'%A%' GROUPBYId HAVINGCOUNT(*)>1; ∙A. Id Count 1 2 2 2 3 1 ∙B. Id Count 1 3 2 3 ∙C
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 外语 jsp js servlet sql 测试