当前位置:文档之家› JAVA题库-格林模拟试题二(下)(7)

JAVA题库-格林模拟试题二(下)(7)

JAVA题库-格林模拟试题二(下)(7)
JAVA题库-格林模拟试题二(下)(7)

JAVA题库:格林模拟试题二(下)(7)

JAVA题库:格林模拟试题二(下)(7)JAVA题库:格林模拟试题二(下)(7)question52)

giventhefollowingclassdefinition,whichofthefollowingmet hodscouldbelegallyplacedafterthecomment

//herepublicclassrid{publicvoidamethod(inti,strings){}//he re}

1)publicvoidamethod(strings,inti){}

2)publicintamethod(inti,strings){}

3)publicvoidamethod(inti,stringmystring){}

4)publicvoidamethod(inti,strings){}

question53)

giventhefollowingclassdefinitionwhichofthefollowingcanb elegallyplacedafterthecommentline

//here?

classbase{publicbase(inti){}}publicclassmyoverextendsbas e{publicstaticvoidmain(stringarg[]){myoverm=newmyover(10); }myover(inti){super(i);}myover(strings,inti){this(i);//here}}

1)myoverm=newmyover();

2)super();

3)this("hello",10);

4)baseb=newbase(10);

question54)

giventhefollowingclassdefinition,whichofthefollowingstat ementswouldbelegalafterthecomment//here

classinout{strings=newstring("between");publicvoidameth od(finalintiargs){intiam;classbicycle{publicvoidsayhello(){//her e}}//endofbicycleclass}//endofamethodpublicvoidanother(){in tiother;}}

1)system.out.println(s);

2)system.out.println(iother);

3)system.out.println(iam);

4)system.out.println(iargs);JAVA题库:格林模拟试题二(下)(7) 相关内容:

相关主题
文本预览
相关文档 最新文档