欢迎来到天天文库
浏览记录
ID:37859710
大小:77.00 KB
页数:6页
时间:2019-06-01
《Java考试资料(考试试卷一)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、装订线内不要答题,装订线外不要写姓名、学号、学院专业年级班签个人信息,违者试卷作0分处理考点号教室号姓名学院专业年级班号学号(全号)湖南农业大学课程考核试卷课程名称(全称):Java程序设计(双语)课程代码:20638B0考核时间:2011年01月04日试卷号:A考核对象:电子商务08-1、电子商务08-2大题号一二三四五六七八九十总分题分202020101020得分得分I、Chooseonecorrectanswer(Total20points,eachquestion2points)1.Giventhefollowingcode:switch(m){case0:Syste
2、m.out.println(Condition0);case1:System.out.println(Condition1);case2:System.out.println(Condition2);case3:System.out.println(Condition3);break;default:System.out.println(OtherCondition);}WhichvaluesofmwillcauseCondition2isoutput?()A.0,1and2B.only1C.only2D.only02.Choosethevalididentifierfrom
3、thoselistedbelow.()A.MyMethodB.3byteC.5_constD.true3.Whichmethodisfasterforlinearsearchandbinarysearch?()A.linearsearchB.binarysearchC.equalD.differentinvarioussituations4.Therearethreemainattributesofclass类except()A.encapsulationB.inheritance继承性C.abstractionD.polymorphism多态性第6页共6页5.Whichla
4、nguageisalow-levelprogramminglanguageinwhichamnemonicisusedtorepresenteachofthemachinelanguageinstructions?()A.ThemachinelanguageB.AssemblylanguageC.TheadalanguageD.Thehigh-levellanguage6.Whichisright?()A.Stringtemp[]=newString{"j""a""z"};B.chartemp[]={"j""b""c"};C.Stringtemp={"a","b","c"};
5、D.Stringtemp[]={"a","b","c"};7.()containspredefinedclassesandinterfacesfordevelopingJavaprograms:A.APIB.OOPC.DOMD.COM8.()areerrorsthatoccurduringcompilation编写.A.logicerrors; B.runtimeerrors;C.syntaxerrors;D.othererrors;9.Theresultof2+5*3>7*(2+4)-1is?()A.nullB.trueC.falseD.others10.Theresult
6、of(6>4)^(8>0)is?()A.nullB.trueC.falseD.others得分II、Decidecorrectorwrong(Total20points,eachquestion2points,“√”meansright,“X”meanswrong)1、theprecedence优先权of!islowerthan*.(错)2、Evaluatewhateversubexpressionsyoucanpossiblyevaluatefromrighttoleft.(错)3、Runtimeerrorsoccurwhenaprogramdoesnotperformth
7、ewayitwasintendedto.(错)4、theelseclausematchesthemostrecentunmatchedifclauseinthesameblock.(对)5、Thesymbols?and:appeartogetherinaconditionalexpression,theyformaconditionaloperator.Thisoperatoriscalledaternaryoperator.(对)第6页共6页6、Itwillcausealogicerrorifyouu
此文档下载收益归作者所有