niusouti.com
更多“Given:When line 15 is reached, how many objects are eligible for the garbage collector?() ”相关问题
  • 第1题:

    Given:When the doSomething method is called, after which line does the Object created in line 5 become available for garbage collection?()

    A.Line 5

    B.Line 6

    C.Line 7

    D.Line 8

    E.Line 9

    F.Line 10


    参考答案:D

  • 第2题:

    Given:WhichchangecanyoumaketoTargetwithoutaffectingClient?()

    A.Line4ofclassTargetcanbechangedtoreturni++;

    B.Line2ofclassTargetcanbechangedtoprivateinti=1;

    C.Line3ofclassTargetcanbechangedtoprivateintaddOne(){

    D.Line2ofclassTargetcanbechangedtoprivateIntegeri=0;


    参考答案:D

  • 第3题:

    有如下类定义: class Point{ private: static int how_many; }; ___________how_many=0; 要初始化Point类的静态成员how_many,下画线处应填入的内容是( )。

    A.int

    B.static int

    C.int Point::

    D.static int Point::


    正确答案:C
    本题考查静态数据成员,静态数据成员可以初始化,但只能在类体外进行初始化,其一般形式为:数据类型类名::静态数据成员名=初值。所以本题答案为C。

  • 第4题:

    Given:WhichlineofcodemarkstheearliestpointthatanobjectreferencedbyintObjbecomesacandidatefor garbagecollection?()

    A.Line16

    B.Line17

    C.Line18

    D.Line19


    参考答案:D

  • 第5题:

    有如下类定义: class Point{ private: static int how_many; }; ______how_many=0; 要初始化Point类的静态成员how_many,下划线处应填入的内容是

    A.int

    B.static int

    C.int Point: :

    D.static int Point


    正确答案:C
    解析:static int n;是定义静态全局变量,int point是定义类的。

  • 第6题:

    计划的主要内容包括______计划必须清楚的确定和描述这些内容。

    A.What,Why,Who,Where,When,How many,How much

    B.What,Why,We,Where,When,How to,How much

    C.What,Why,We,Where,When,How,How much

    D.What,Why,Who,Where,When,How,How much


    确定组织发展目标制定全局战略;开发出一组广泛的相关计划;制定战略实施和资源分配方案