java练习题附标准答案answerstopratise5

java练习题附标准答案answerstopratise5

ID:34613222

大小:47.00 KB

页数:6页

时间:2019-03-08

java练习题附标准答案answerstopratise5_第1页
java练习题附标准答案answerstopratise5_第2页
java练习题附标准答案answerstopratise5_第3页
java练习题附标准答案answerstopratise5_第4页
java练习题附标准答案answerstopratise5_第5页
资源描述:

《java练习题附标准答案answerstopratise5》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、一、MultipleChoice1.Javaisanobject-orientedprogramminglanguage.Anobject-orientedlanguage:(a)Usesstructuredprogramming.(b)Viewsaprogramasconsistingofobjectswhichcommunicatethroughinteractions.(c)Functionallybreaksdownproblemsintosmaller,moremanageableproblems.(d)Alloftheabove.2.InJava,th

2、eequalsignisusedasthe___________operator.(a)increment(b)decrement(c)assignment(d)negation矚慫润厲钐瘗睞枥庑赖。3.InJava,sourcecodeiscompiledintoobjectcodecalled______________.(a)Bit-code(b)Classcode(c)Methodcode(d)Byte-code聞創沟燴鐺險爱氇谴净。4.IdentifytheinvalidJavaidentifier.(a)1Week(b)Week1(c)amountDu

3、e(d)amount_due残骛楼諍锩瀨濟溆塹籟。5.Whichoperatorisusedtoconcatenatetwostrings?(a)+(b)–(c)*(d)/酽锕极額閉镇桧猪訣锥。6.Whichstatementorgroupofstatementsproducestheoutput:“Java”,I’mcoming!(a)System.out.print(“Java”,I’mcoming!)(b)System.out.println(““Java””,I’mcoming!);(c)System.out.println(““Java”,I’mc

4、oming!”);(d)System.out.print(““Java”,I’mcoming!”);彈贸摄尔霁毙攬砖卤庑。7.Whenthenumberofrepetitionsareunknowninadvance,youshouldusea___________statement.(a)whileordo…while(b)onlywhile(c)for(d)Noneoftheabove謀荞抟箧飆鐸怼类蒋薔。8.Amethodthatperformssomeactionotherthanreturningavalueiscalleda__________meth

5、od.(a)null(b)void(c)public(d)private厦礴恳蹒骈時盡继價骚。9.Avariablewhosemeaningisconfinedtoamethoddefinitioniscalled:(a)instancevariable(b)localvariable(c)globalvariable(d)noneoftheabove茕桢广鳓鯡选块网羈泪。10.InJava,acommentsblockisdelimitedby:(a)()(b)/**/(c)““(d){}鹅娅尽損鹌惨歷茏鴛賴。1.InJava,call-by-valueison

6、lyusedwith:(a)objects(b)primitivetypes(c)this(d)alloftheabove籟丛妈羥为贍偾蛏练淨。2.TwomethodsthatareexpectedtobeinallJavaclassesare:(a)getNameandsetName(b)toStringandequals(c)compareToandcharAt(d)toLowerCaseandtoUpperCase預頌圣鉉儐歲龈讶骅籴。3.AllofthesearemethodsofJava’sMathclassexcept:(a)pow(b)min(c)r

7、andom(d)toString渗釤呛俨匀谔鱉调硯錦。4.nullcanbeused:(a)toindicateavariablehasnorealvalue(b)inaBooleanexpressionwith==(c)asaplaceholder(d)alloftheabove铙誅卧泻噦圣骋贶頂廡。5.Astaticmethodisonethatcanbeusedwitha_____________.(a)instancevariable(b)localvariable(c)globalvariable(d)theclassnameasacallingobje

8、ct擁締凤

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。