大数据基础技能试题及答案.docx
- 文档编号:481274
- 上传时间:2022-10-10
- 格式:DOCX
- 页数:23
- 大小:25.31KB
大数据基础技能试题及答案.docx
《大数据基础技能试题及答案.docx》由会员分享,可在线阅读,更多相关《大数据基础技能试题及答案.docx(23页珍藏版)》请在冰豆网上搜索。
大数据基础技能试题及答案
Java基础
1.Whichofthefollowingwillcompilecorrectly?
A)floatf=10f;
B)floatf=10.1;
C)floatf=10.1f;
D)byteb=10b;
2.Whichdeclarationsofidentifiersarelegal
A.$persons
B.TwoUsers
C.*point
D.this
E._endline
3.Whichstatementofassigningalongtypevariabletoahexadecimalvalueiscorrect
A.longnumber=345L;
B.longnumber=0345;
C.longnumber=0345L;
D.longnumber=0x345L
4.Whichofthefollowingfragmentsmightcauseerrors
A.Strings="Gonewiththewind";
Stringt="good";
Stringk=s+t;
B.Strings="Gonewiththewind";
Stringt;
t=s[3]+"one";
C.Strings="Gonewiththewind";
Stringstandard=s.toUpperCase();
D.Strings="homedirectory";
Stringt=s-"directory";
5.Whicharesyntacticallyvalidstatementat//pointx
classPerson{
privateinta;
publicintchange(intm){returnm;}
}
publicclassTeacherextendsPerson{
publicintb;
publicstaticvoidmain(Stringarg[]){
Personp=newPerson();
Teachert=newTeacher();
inti;
//pointx
}
}
A.i=m;
B.i=b;
C.i=p.a;
D.i=p.change(30);
E.i=t.b.
6.Whichlayoutmanagerisusedwhentheframeisresizedthebuttons'spositionintheFramemightbechanged
A.BorderLayout
B.FlowLayout
C.CardLayout
D.GridLayout
7.Giventhefollowingcodefragment:
1)publicvoidcreate(){
2}VectormyVect;
3}myVect=newVector();
4}}
Whichofthefollowingstatementsaretrue
A.Thedeclarationonline2doesnotallocatememoryspaceforthevariablemyVect.
B.Thedeclarationonline2allocatesmemoryspaceforareferencetoaVectorobject.
C.Thestatementonline2createsanobjectofclassVector.
D.Thestatementonline3createsanobjectofclassVector.
E.Thestatementonline3allocatesmemoryspaceforanobjectofclassVector
8.Whichofthefollowingansweriscorrecttoexpressthevalue8inoctalnumber
A.010
B.0x10
C.08
D.0x8
9.WhicharenotJavakeywords
A.TRUE
B.sizeof
C.const
D.super
E.void
10.Whichofthefollowingstatementsaretrue
A.Theequals()methoddeterminesifreferencevaluesrefertothesameobject.
B.The==operatordeterminesifthecontentsandtypeoftwoseparateobjectsmatch.
C.Theequals()methodreturnstrueonlywhenthecontentsoftwoobjectsmatch.
D.TheclassFileoverridesequals()toreturntrueifthecontentsandtypeoftwoseparateobjectsmatch.
11.Whichstatementsaboutinheritancearetrue
A.InJavaprogramminglanguageonlyallowssingleinheritance.
B.InJavaprogramminglanguageallowsaclasstoimplementonlyone
interface.
C.InJavaprogramminglanguageaclasscannotextendaclassandimplement
ainterfacetogether.
D.InJavaprogramminglanguagesingleinheritancemakescodemore
reliable.
12.
1)classPerson{
2}publicvoidprintValue(inti,intj){/*…*/}
3}publicvoidprintValue(inti){/*...*/}
4}}
5)publicclassTeacherextendsPerson{
6}publicvoidprintValue(){/*...*/}
7}publicvoidprintValue(inti){/*...*/}
8}publicstaticvoidmain(Stringargs[]){
9}Persont=newTeacher();
10}t.printValue(10);
11}}
12}}
Whichmethodwillthestatementonline10call
A.online2
B.online3
C.online6
D.online7
13.WhicharenotJavaprimitivetypes
A.short
B.Boolean
C.unit
D.float
14、Themethodresume()isresponsibleforresumingwhichthread'sexecution
A.Thethreadwhichisstoppedbycallingmethodstop()
B.Thethreadwhichisstoppedbycallingmethodsleep()
C.Thethreadwhichisstoppedbycallingmethodwait()\
D.Thethreadwhichisstoppedbycallingmethodsuspend()
15.Whichofthefollowingrangeofintiscorrect
A.-2^7–2^7-1
B.0–2^32-1
C.-2^15–2^15-1
D.-2^31–2^31-1
16.Whichkeywordshouldbeusedtoenableinteractionwiththelockofan
objectTheflagallowsexclusiveaccesstothatobject.
A.transient
B.synchronized
C.serialize
D.static
17.Whichisthereturntypeofthemethodmain()
A.int
B.void
C.boolean
D.static
18.Giventhefollowingcode:
if(x>0){"first");}
elseif(x>-3){"second");}
else{"third");}
Whichrangeofxvaluewouldprintthestring"second"
A.x>0
B.x>-3
C.x<=-3
D.x<=0&x>-3
19、Whichofthefollowingansweriscorrecttoexpressthevalue10inhexadecimalnumber
A.0xA
B.0x16
C.0A
D.016
20.Whichstatementsaboutthegarbagecollectionaretrue
A.Theprogramdevelopermustcreateathreadtoberesponsibleforfree
thememory.
B.Thegarbagecollectionwillcheckforandfreememorynolongerneeded.
C.Thegarbagecollectionallowtheprogramdevelopertoexplicityand
immediatelyfreethememory.
D.Thegarbagecollectioncanfreethememoryusedjavaobjectatexpect
time.
21、Giventhefollowingcode:
1)publicclassTest{
2}intm,n;
3}publicT
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数据 基础 技能 试题 答案