资源描述:
《外国小说欣赏单元话题知识及应用》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、java笔试考题2(java笔试考题2)1.thefollowingstatementaboutPreparedStatementiswrong:().A.PreparedStatementisthesubinterfaceofStatement.B.usingPreparedStatementprecompiledSQLcaneffectivelypreventSQLinjection.C.PreparedStatementhasthefunctionofbatchprocessingSQL.ThesetXXXmet
2、hodofD.PreparedStatementcanbeusedtosetthereservedtablename,fieldnameandotherparameters.2.thefollowingdescriptionofthesequenceisincorrect:()TheA.sequence,liketables,isanobjectintheOracledatabaseThevaluegeneratedbytheB.sequencecanbeusedastheprimarykeyvalueofthetab
3、leThebestwayforC.tousesequencesisthatmultipletablescanshareonesequencetoreducethenumberofOracledatabasesequencesD.MySqldatadoesnotsupportsequences3.thefollowingmethodsareusedtodefinetheexecutionofthethread:A.start()B.init()C.run()D.synchronized()4.thefollowingex
4、istingbuilttableSQLstatement:CREATETABLEdepartments(department_idNUMBERPRIMARYKEYdepartment_name(4),VARCHAR2(20),cityVARCHAR2(20),provinceVARCHAR2(20))theinsertstatementiscorrect:(a).A.INSERTINTOdepartmentsVALUES(300,'ABC');B.INSERTINTOdepartments(department_nam
5、e,department_id)VALUES(300,'design');C.INSERTINTOdepartments(department_name,city)VALUES('design','BJ');D.INSERTINTOdepartmentsVALUES(300,'ABC',null,null);5.therunningresultofthefollowingcodeis().PublicclassTestOneimplementsRunnablestaticvoidmain{public(String[]
6、args)throwsExceptiontThread{Thread=new(new(TestOne));t.start();System.out.print("Started");(t.join);System.out.print("Complete");}public(voidrun){for(inti=0<4;I;i++){System.out.print}}}(I);A.StartedCompleteB.StartedComplete0123C.Started0l23CompleteD.0123StartedC
7、omplete6.analysisofthefollowingcode,thecorrectsyntaxoftheSqlstatementis().A.SELECTclass,COUNT(stuId)FROMstudentsWHEREstuAge>18GROUPBYclassHAVINGcount(stuId)>3B.SELECTname,class,COUNT(stuId)FROMstudentsWHEREstuAge>18GROUPBYclassHAVINGcount(stuId)>3C.SELECTclass,C
8、OUNT(stuId)FROMstudentsGROUPBYclassHAVINGstuAge>18D.SELECTname,class,COUNT(stuId)FROMstudentsWHERECOUNT(stuId)>3GROUPBYclass7.inthefollowingOraclestatement,DCLbelongs