大数据基础技能试题及答案文档格式.docx
《大数据基础技能试题及答案文档格式.docx》由会员分享,可在线阅读,更多相关《大数据基础技能试题及答案文档格式.docx(24页珍藏版)》请在冰豆网上搜索。
![大数据基础技能试题及答案文档格式.docx](https://file1.bdocx.com/fileroot1/2022-10/17/59b2650f-7cd5-4785-89c7-4a5a99bac63e/59b2650f-7cd5-4785-89c7-4a5a99bac63e1.gif)
D.longnumber=0x345L
4.Whichofthefollowingfragmentsmightcauseerrors
A.Strings="
Gonewiththewind"
;
Stringt="
good"
Stringk=s+t;
B.Strings="
Stringt;
t=s[3]+"
one"
C.Strings="
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.InJavaprogramminglanguageallowsaclasstoimplementonlyoneinterface.
C.InJavaprogramminglanguageaclasscannotextendaclassandimplementainterfacetogether.
D.InJavaprogramminglanguagesingleinheritancemakescodemorereliable.
12.
1)classPerson{
2}publicvoidprintValue(inti,intj){/*••-*/}
3}publicvoidprintValue(inti){/*...*/}
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
12.WhicharenotJavaprimitivetypes
A.short
B.Boolean
C.unit
D.float
13.Themethodresume()isresponsibleforresumingwhichthread'
sexecution
A.Thethreadwhichisstoppedbycallingmethodstop()
B.Thethreadwhichisstoppedbycallingmethodsleep()
D.Thethreadwhichisstoppedbycallingmethodsuspend()
14.Whichofthefollowingrangeofintiscorrect
A.-2A7-2A7-1
B.0-2A32-1
C.-2人15-2人15-1
D.-2A31-2A31-1
15.WhichkeywordshouldbeusedtoenableinteractionwiththelockofanobjectTheflagallowsexclusiveaccesstothatobject.
A.transient
B.synchronized
C.serialize
D.static
16.Whichisthereturntypeofthemethodmain()
A.int
B.void
C.boolean
17.Giventhefollowingcode:
if(x>
0)(System.out.println("
first"
);
elseif(x>
-3)(System.out.println("
second"
else(System.out.println("
third"
Whichrangeofxvaluewouldprintthestring"
A.x>
0
B.x>
-3
C.x<
=-3
D.x<
=0&
x>
18.Whichofthefollowingansweriscorrecttoexpressthevalue10inhexadecimalnumber
A.0xA
B.0x16
C.0A
D.016
19.Whichstatementsaboutthegarbagecollectionaretrue
A.Theprogramdevelopermustcreateathreadtoberesponsibleforfreethememory.
B.Thegarbagecollectionwillcheckforandfreememorynolongerneeded.
C.Thegarbagecollectionallowtheprogramdevelopertoexplicityandimmediatelyfreethememory.
D.Thegarbagecollectioncanfreethememoryusedjavaobjectatexpecttime.
21、Giventhefollowingcode:
1)publicclassTest{
2}intm,n;
3}publicTest(){}
4}publicTest(inta){m=a;
5}publicstaticvoidmain(Stringarg[]){
6}Testt1,t2;
7}intj,k;
8}j=0;
k=0;
9}t1=newTest();
10}t2=newTest(j,k);