网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
voidstart(){13.Aa=newA();14.Bb=newB();15.a.s(b);16.b=null;17.a=null;18.System.out.println(startcompleted”);19.}WhenistheBobject,createdinline14,eligibleforgarbagecollection?()
A.Afterline16.
B.Afterline17.
C.Afterline18(whenthemethodsends).
D.Thereisnowaytobeabsolutelycertain.
E.TheobjectisNOTeligibleforgarbagecollection.
参考答案
更多 “ voidstart(){13.Aa=newA();14.Bb=newB();15.a.s(b);16.b=null;17.a=null;18.System.out.println(startcompleted”);19.}WhenistheBobject,createdinline14,eligibleforgarbagecollection?() A.Afterline16.B.Afterline17.C.Afterline18(whenthemethodsends).D.Thereisnowaytobeabsolutelycertain.E.TheobjectisNOTeligibleforgarbagecollection. ” 相关考题
考题
publicclassX{2.publicobjectm(){3.objecto=newfloat(3.14F);4.object[]oa=newobject[1];5.oa[0]=o;6.o=null;7.oa[0]=null;10.returno;9.}10.}Whenisthefloatobjectcreatedinline3,eligibleforgarbagecollection?()
A.Justafterline5.B.Justafterline6.C.Justafterline7.D.Justafterline8(thatis,asthemethodreturns).
考题
classA{}classAlpha{privateAmyA=newA();voiddolt(Aa){a=null;}voidtryIt(){dolt(myA);}}Whichtwostatementsarecorrect?()
A.TherearenoinstancedofAthatwillbecomeeligibleforgarbagecollection.B.ExplicitlysettingmyAtonullmarksthatinstancetobeeligibleforgarbagecollection.C.AnycallontryIt()causestheprivateinstanceofAtobemarkedforgarbagecollection.D.PrivateinstancesofAbecomeeligibleforgarbagecollectionwheninstancesofAlphabecomeeligibleforgarbagecollection.
考题
1.classTest{2.privateDemod;3.voidstart(){4.d=newDemo();5.this.takeDemo(d);6.}7.8.voidtakeDemo(Demodemo){9.demo=null;10.demo=newDemo();11.}12.}WhenistheDemoobject,createdonline3,eligibleforgarbagecollection?()A.Afterline5.B.Afterline9.C.Afterthestart()methodcompletes.D.WhenthetakeDemo()methodcompletes.E.Whentheinstancerunningthiscodeismadeeligibleforgarbagecollection.
考题
publicclassX{publicobjectm(){objecto=newfloat(3.14F);objectoa=newobject[1];oa[0]=o;o=null;oa[0]=null;returno;}}Whenisthefloatobjectcreatedinline3,eligibleforgarbagecollection?()
A.Justafterline5.B.Justafterline6.C.Justafterline7.D.Justafterline8(thatis,asthemethodreturns).
考题
publicclassX{publicobjectm(){objecto=newfloat(3.14F);objectoa=newobject[1];oa[0]=o;o=null;returnoa[0];}}Whenisthefloatobjectcreatedinline3,eligibleforgarbagecollection?()
A.Justafterline5B.Justafterline6C.Justafterline7(thatis,asthemethodreturns)D.Neverinthismethod.
考题
class A{void P1(){cout"A111"};void P2(){cout"A222"};};class B:public A{void P1(){cout"B111"};virtual void P2(){cout"B222"};}..........A*cl=NULL;cl=new A;A-P1();A-P2();delete cl;cl=NULL;cl=new B;A-P1();A-P2();delete cl;cl=NULL;..........写出运行结果;
考题
2、假设 A 是一个类的名字,下面的语句生成了几个类A的对象? A * arr[4] = { new A(), NULL,new A() };A.A) 1B.B) 2C.C) 3D.D) 4
考题
假设 A 是一个类的名字,下面的语句生成了几个类A的对象? A * arr[4] = { new A(), NULL,new A() };A.A) 1B.B) 2C.C) 3D.D) 4
热门标签
最新试卷