网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
23.Object[]myObjects={24.newinteger(12),25.newString(”foo”),26.newinteger(5),27.newBoolean(true)28.};29.Arrays.sort(myObjects);30.for(inti=0;i31.System.out.print(myObjects[i].toString());32.System.out.print(”);33.}Whatistheresult?()
A.Compilationfailsduetoanerrorinline23.
B.Compilationfailsduetoanerrorinline29.
C.AClassCastExceptionoccursinline29.
D.AClassCastExceptionoccursinline31.
E.Thevalueofallfourobjectsprintsinnaturalorder.
参考答案
更多 “ 23.Object[]myObjects={24.newinteger(12),25.newString(”foo”),26.newinteger(5),27.newBoolean(true)28.};29.Arrays.sort(myObjects);30.for(inti=0;i31.System.out.print(myObjects[i].toString());32.System.out.print(”);33.}Whatistheresult?()A.Compilationfailsduetoanerrorinline23.B.Compilationfailsduetoanerrorinline29.C.AClassCastExceptionoccursinline29.D.AClassCastExceptionoccursinline31.E.Thevalueofallfourobjectsprintsinnaturalorder. ” 相关考题
考题
Given:fooandbararepublicreferencesavailabletomanyotherthreads,fooreferstoaThreadandbarisanObject.Thethreadfooiscurrentlyexecutingbar.wait().Fromanotherthread,whatprovidesthemostreliablewaytoensurethatfoowillstopexecutingwait()?()A.foo.notify();B.bar.notify();C.foo.notifyAll();D.Thread.notify();E.bar.notifyAll();F.Object.notify();
考题
GivenanELfunctionfoo,innamespacefunc,thatrequiresalongasaparameterandreturnsaMap,whichtwoarevalidinvocationsoffunctionfoo?()
A.${func(1)}B.${foo:func(4)}C.${func:foo(2)}D.${foo(5):func}E.${func:foo(“easy”)}F.${func:foo(“3”).name}
考题
ClicktheExhibitbutton.Given:11.%com.example.Advisoradvisor=newcom.example.Advisor();%12.%request.setAttribute(foo,advisor);%Assumingtherearenootherfooattributesinthewebapplication,whichthreearevalidELexpressionsforretrievingtheadvicepropertyofadvisor?()A.${foo.advice}B.${request.foo.advice}C.${requestScope.foo.advice}D.${requestScope[foo[advice]]}E.${requestScope[foo][advice]}
考题
GivenanELfunctionfoo,innamespacefunc,thatrequiresalongasaparameterandreturnsaMap,which twoarevalidinvocationsoffunctionfoo?()
A.${func(1)}B.${foo:func(4)}C.${func:foo(2)}D.${foo(5):func}E.${func:foo(easy)}F.${func:foo(3).name}
考题
fooandbararepublicreferencesavailabletomanyotherthreads.fooreferstoaThreadandbarisanObject.Thethreadfooiscurrentlyexecutingbar.wait().Fromanotherthread,whichstatementisthemostreliablewaytoensuethatfoowillstopexecutingwait()?A.foo.notify();B.bar.notify();C.foo.notifyAll();D.Thread.notify();E.bar.notiFYAll();F.Object.notify();
考题
publicclassTest{2.publicstaticvoidmain(Stringargs[]){3.classFoo{4.publicinti=3;5.}6.Objecto=(Object)newFoo();7.Foofoo=(Foo)o;8.System.out.printIn(foo.i);9.}10.}Whatistheresult?()
A.Compilationwillfail.B.Compilationwillsucceedandtheprogramwillprint“3”C.CompilationwillsucceedbuttheprogramwillthrowaClassCastExceptionatline6.D.CompilationwillsucceedbuttheprogramwillthrowaClassCastExceptionatline7.
考题
publicclassTest{publicstaticvoidmain(Stringargs[]){classFoo{publicinti=3;}Objecto=(Object)newFoo();Foofoo=(Foo)o;System.out.println(i=+foo.i);}}Whatistheresult?()
A.i=3B.Compilationfails.C.AClassCastExceptionisthrownatline6.D.AClassCastExceptionisthrownatline7.
考题
publicclassTest{publicstaticvoidmain(Stringargs){classFoo{publicinti=3;}Objecto=(Object)newFoo();Foofoo=(Foo)o;System.out.printIn(foo.i);}}Whatistheresult?()
A.Compilationwillfail.B.Compilationwillsucceedandtheprogramwillprint“3”C.CompilationwillsucceedbuttheprogramwillthrowaClassCastExceptionatline6.D.CompilationwillsucceedbuttheprogramwillthrowaClassCastExceptionatline7.
热门标签
最新试卷