欢迎来到天天文库
浏览记录
ID:58875438
大小:47.00 KB
页数:11页
时间:2020-09-21
《SSD3 选择题题库完整.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、..SSD3选择题题库1.WhichmethodmustexistineveryJavaapplication?(a)begin(b)paint(c)init(d)mainCorrectansweris(d)窗体顶端2.WhichofthefollowingisavalidcharacterliteralinJava?(a)';'(b)'<='(c)"'"(d)"a"Correctanswer:A窗体底端2.AJavaidentifiermaybeginwithallbutwhichofthefollowing?(a)$(
2、b)if(c)_(theunderscore)(d)0Correctansweris(d)3.InthecontextofJavaprogramming,garbagecollectionrefersto(a)automaticbalancingofparenthesisperformedbysomeeditors(b)removalofJavaprogramsthatcouldcausedamagetoasystem(c)conversionofcommentsintoJavadoccomments(d)automati
3、creturnofmemorytotheheapforobjectsnolongerrequiredbytheprogramCorrectansweris(d)4.WhatwillbeoutputwhenthefollowingJavaprogramsegmentisexecuted?intx=5;inty=2;System.out.println(x+y);(a)5+2(b)52(c)7(d)52Correctansweris(c)5.Whichofthefollowingpartsofanif-else-stateme
4、ntisoptional?(a)theifpart.....(b)theelsepart(c)theparenthesisaroundthecondition(d)theconditionCorrectansweris(b)6.WhichofthefollowingistheJavaloopconstructtypicallyusedwhentherangeisclear?(a)while-loop(b)for-loop(c)switch-loop(d)do-while-loopCorrectansweris(b)8.Co
5、nsiderthefollowingJavaprogramsegment.importjava.io.*;publicclassTest{publicTest(){System.out.println("default");}publicTest(inti){System.out.println("non-default");}publicstaticvoidmain(String[]args){Testt=newTest(2);}}Whichofthefollowingwillbeoutputduringexecutio
6、noftheprogramsegment?(a)Thelineoftext"non-default"followedbythelineoftext"default"(b)Thelineoftext"default"followedbythelineoftext"non-default"(c)Thelineoftext"default"(d)Thelineoftext"non-default"Correctansweris(d)9.WhatisthenameoftheJDKprogramthatprocessesJavado
7、ccomments?(a)java(b)javac.....(c)javacom(d)javadocCorrectansweris(d)10.AccordingtotheJavacodeconventions,fileslongerthan_____linesshouldbe_____.(a)100,encouraged(b)100,avoided(c)2000,avoided(d)2000,encouragedCorrectansweris(c)2.Theprimitivefloating-pointtypesavail
8、ableinJavaare_____and_____.(a)real,double(b)float,double(c)real,float(d)single,realCorrectansweris(b)3.HowmanybytesarerequiredtorepresentaUnicodecharact
此文档下载收益归作者所有