金蝶中间件校招笔试题Word文档下载推荐.docx

上传人:b****2 文档编号:15125625 上传时间:2022-10-27 格式:DOCX 页数:19 大小:22.98KB
下载 相关 举报
金蝶中间件校招笔试题Word文档下载推荐.docx_第1页
第1页 / 共19页
金蝶中间件校招笔试题Word文档下载推荐.docx_第2页
第2页 / 共19页
金蝶中间件校招笔试题Word文档下载推荐.docx_第3页
第3页 / 共19页
金蝶中间件校招笔试题Word文档下载推荐.docx_第4页
第4页 / 共19页
金蝶中间件校招笔试题Word文档下载推荐.docx_第5页
第5页 / 共19页
点击查看更多>>
下载资源
资源描述

金蝶中间件校招笔试题Word文档下载推荐.docx

《金蝶中间件校招笔试题Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《金蝶中间件校招笔试题Word文档下载推荐.docx(19页珍藏版)》请在冰豆网上搜索。

金蝶中间件校招笔试题Word文档下载推荐.docx

D.(i.equals(d))

E.(d.equals(l))

F.(i.equals(l))

G.(l.equals(42L))

3.Whathappenswhenyoutrytocompileandrunthefollowingapplication?

Chooseall

Correctoptions.

1.publicclassZ{

2.publicstaticvoidmain(String[]args){

3.newZ();

4.}

5.

6.Z(){

7.Zalias1=this;

8.Zalias2=this;

9.synchronized(alias1){

10.try{

11.alias2.wait();

12.System.out.println("

DONEWAITING"

);

13.}

14.catch(InterruptedExceptione){

15.System.out.println("

INTERRUPTED"

16.}

17.catch(Exceptione){

18.System.out.println("

OTHEREXCEPTION"

19.}

20.finally{

21.System.out.println("

FINALLY"

22.}

23.}

24.System.out.println("

ALLDONE"

25.}

26.}

A.Theapplicationcompilesandprints“DONEWAITING”

B.Theapplicationcompilesbutdoesn’tprintanything

C.Theapplicationcompilesandprint“FINALLY”

D.Theapplicationcompilesandprint“ALLDONE”

E.Theapplicationcompilesandprint“INTERRUPTED”

F.Theapplicationcompilesandprint“DONEWAITING”and“FINALLY”

4.Considerthefollowingclasses:

1.classPerson{

2.publicvoidprintValue(inti,intj){/*.....*/}

3.publicvoidprintValue(inti){/*....*/}

5.publicclassTeacherextendsPerson{

6.publicvoidprintValue(){/*...*/}

7.publicvoidprintValue(inti){/*...*/}

8.publicvoidprintValue(Stringi){/*...*/}

9.publicstaticvoidmain(Stringargs[]){

10.Persont=newTeacher();

11.charch='

y'

;

12.t.printValue(ch);

13.}

14.}

Whichofthestatementsbelowistrue?

A.Line7willnotcompile,becausevoidmethodscannotbeoverridden

B.Line12willnotcompile,becausethereisnoversionofprintValue()thattakesacharargument

C.Thecodewillcompilebutwillthrowanexceptionatline12atruntime

D.Thestatementonline12willinvokethemethodonline8

E.Thestatementonline12willinvokethemethodonline2

F.Thestatementonline12willinvokethemethodonline3

G.Thestatementonline12willinvokethemethodonline7

5.Considerthefollowingstatement,chooseallcorrectoptions

YouaregivenaclasshierarchywithaninstanceoftheClassDog.TheclassDogisachildof

MammalandtheclassMammalisachildoftheclassVertebrate.TheclassVertebratehasamethodcalledmovewhichprintsoutthestring“move”.TheclassMammaloverridesthismethodandprintsoutthestring”walks”.TheclassDogoverridesthismethodandprintsoutthestring“walksonpaws”.

Givenaninstance(dog)oftheclassDog,howcanyouaccesstheancestormethodmoveinVertebratesoitprintsoutthestring“move”;

A.dog.super().super().move();

B.dog.parent().parent().move();

C.dog.move();

D.noneoftheabove

6.Whatwillhappenwhenyouattempttocompileandrunthefollowingcode.

publicclassTest{

publicstaticvoidmain(Stringargv[]){

HHQht=newHHQ("

myname"

ht.start();

}

}

classHHQextendsThread{

privateStringname="

"

HHQ(Strings){

name=s;

publicvoidrun(){

inner();

System.out.println("

finished"

publicvoidinner(){

while(true){

try{

System.out.println("

waiting"

wait();

}catch(InterruptedExceptionie){

}

System.out.println(name);

notifyAll();

}

A.Itwillcauseacompiletimeerror

B.Compilationandoutputof“waiting”

C.Compilationandoutputof“waiting”followedby“finished”

D.Runtimeerror,outputof“waiting”andanexceptionwillbethrown

7.Whichofthefollowingmostcloselydescribestheprocessofoverriding?

A.Aclasswiththesamenamereplacesthefunctionalityofaclassdefinedearlierinthehierarchy

B.Amethodwiththesamenamecompletelyreplacesthefunctionalityofamethodearlierinthehierarchy

C.Amethodwiththesamenamebutdifferentparametersgivesmultipleusesforthesamemethodname

D.Aclassispreventedfromaccessingmethodsinitsimmediateancestor

8.Giventhefollowingcode:

1classA{

2publicvoidprocess(){System.out.print("

A"

}}

3classBextendsA{

4publicvoidprocess()throwsIOException{

5super.process();

6System.out.print("

B"

7thrownewIOException();

8}

9publicstaticvoidmain(String[]args){

10try{

11newB().process();

12}catch(IOExceptione){

13System.out.println("

Exception"

14}

15}

16}

Whatwillhappenwhenyouattempttocompileandrunit?

A.Theprogramwillrunandoutput“A”,”B”and“Exception”

B.Theprogramwillrunandoutput“A”

C.Theprogramwillrunandoutput“B”and“Exception”

D.Compilationfa

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 党团工作 > 党团建设

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1