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.Thereisnowaytobe

题目
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?() ”相关问题
  • 第1题:

    publicclassX{publicobjectm(){objecto=newfloat(3.14F);objectoa=newobject[1];oa[0]=o;o=null;returnoa[0];}}Whenisthefloatobjectcreatedinline3,eligibleforgarbagecollection?()

    A.Justafterline5

    B.Justafterline6

    C.Justafterline7(thatis,asthemethodreturns)

    D.Neverinthismethod.


    参考答案:D

  • 第2题:

    2、假设 A 是一个类的名字,下面的语句生成了()个类A的对象。 A * arr[4] = { new A(), NULL,new A() };

    A.3

    B.4

    C.1

    D.2


    B) 2

  • 第3题:

    假设 A 是一个类的名字,下面的语句生成了几个类A的对象? A * arr[4] = { new A(), NULL,new A() };

    A.A) 1

    B.B) 2

    C.C) 3

    D.D) 4


    智商有种族差别,人格没有

  • 第4题:

    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;

    ..........

    写出运行结果;


    正确答案:
     

  • 第5题:

    2、假设 A 是一个类的名字,下面的语句生成了几个类A的对象? A * arr[4] = { new A(), NULL,new A() };

    A.A) 1

    B.B) 2

    C.C) 3

    D.D) 4


    B) 2