欢迎来到天天文库
浏览记录
ID:56523631
大小:98.50 KB
页数:19页
时间:2020-06-27
《大大数据基础技能精彩试题及问题详解.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Java基础1.Whichofthefollowingwillcompilecorrectly?A)floatf=10f;B)floatf=10.1;C)floatf=10.1f;D)byteb=10b;2.WhichdeclarationsofidentifiersarelegalA.$personsB.TwoUsersC.*pointD.thisE._endline3.WhichstatementofassigningalongtypevariabletoahexadecimalvalueiscorrectA.longnum
2、ber=345L;B.longnumber=0345;C.longnumber=0345L;D.longnumber=0x345L4.WhichofthefollowingfragmentsmightcauseerrorsA.Strings="Gonewiththewind";Stringt="good";Stringk=s+t;B.Strings="Gonewiththewind";Stringt;t=s[3]+"one";C.Strings="Gonewiththewind";Stringstandard=s.toUpper
3、Case();D.Strings="homedirectory";Stringt=s-"directory";5.Whicharesyntacticallyvalidstatementat//pointxclassPerson{privateinta;publicintchange(intm){returnm;}}publicclassTeacherextendsPerson{publicintb;publicstaticvoidmain(Stringarg[]){Personp=newPerson();Teachert=new
4、Teacher();inti;//pointx}}A.i=m;B.i=b;C.i=p.a;D.i=p.change(30);E.i=t.b.6.Whichlayoutmanagerisusedwhentheframeisresizedthebuttons'spositionintheFramemightbechangedA.BorderLayoutB.FlowLayoutC.CardLayoutD.GridLayout7.Giventhefollowingcodefragment:1)publicvoidcreate(){2}V
5、ectormyVect;3}myVect=newVector();4}}WhichofthefollowingstatementsaretrueA.Thedeclarationonline2doesnotallocatememoryspaceforthevariablemyVect.B.Thedeclarationonline2allocatesmemoryspaceforareferencetoaVectorobject.C.Thestatementonline2createsanobjectofclassVector.D.T
6、hestatementonline3createsanobjectofclassVector.E.Thestatementonline3allocatesmemoryspaceforanobjectofclassVector8.Whichofthefollowingansweriscorrecttoexpressthevalue8inoctalnumberA.B.0x10C.08D.0x89.WhicharenotJavakeywordsA.TRUEB.sizeofC.constD.superE.void10.Whichofth
7、efollowingstatementsaretrueA.Theequals()methoddeterminesifreferencevaluesrefertothesameobject.B.The==operatordeterminesifthecontentsandtypeoftwoseparateobjectsmatch.C.Theequals()methodreturnstrueonlywhenthecontentsoftwoobjectsmatch.D.TheclassFileoverridesequals()tore
8、turntrueifthecontentsandtypeoftwoseparateobjectsmatch.11.WhichstatementsaboutinheritancearetrueA.InJavaprogramminglanguageonlyallow
此文档下载收益归作者所有