Click the Exhibit button. Given:Which two statements are true if a NullPointerException is thrown on line 3 of class C? ()A.The application will crash.B.The code on line 29 will be executed.C.The code on line 5 of class A will execute.D.The code on line 5

题目
Click the Exhibit button. Given:Which two statements are true if a NullPointerException is thrown on line 3 of class C? ()

A.The application will crash.

B.The code on line 29 will be executed.

C.The code on line 5 of class A will execute.

D.The code on line 5 of class B will execute.

E.The exception will be propagated back to line 27.


相似考题
更多“Click the Exhibit button. Given:Which two statements are true if a NullPointerException is thrown on line 3 of class C? () ”相关问题
  • 第1题:

    Given:Which code, inserted at line 16, correctly retrieves a local instance of a Point object?()

    A.Point p = Line.getPoint();

    B.Line.Point p = Line.getPoint();

    C.Point p = (new Line()).getPoint();

    D.Line.Point p = (new Line()).getPoint();


    参考答案:D

  • 第2题:

    下列复选框构造方法,错误的是 ( )

    A.setLayout(new GridLayout(3,1));

    B.add(new Checkbox("one",null,true));

    C.add(new Checkbox("two"));

    D.add(new Checkbox("one",true));


    正确答案:D
    解析:该题考查复选框的构造方法。构造方法的一般格式为:public Checkbox (String label,CheckboxGrou Pgroup,boolean state)。选项A、B、C都是正确的,而选项D是错误的,它的第二个参数应该是CheckboxGrou Pgroup,所以选项D是错误的。

  • 第3题:

    Given:35.Stringname="JaneDoe";36.int$age=24;37.Double_height=123.5;38.double~temp=37.5;Whichtwostatementsaretrue?()

    A.Line35willnotcompile.

    B.Line36willnotcompile.

    C.Line37willnotcompile.

    D.Line38willnotcompile.


    参考答案:A, D

  • 第4题:

    Given:WhichstatementistrueifaResourceExceptionisthrownonline86?()

    A.Line92willnotexecute.

    B.Theconnectionwillnotberetrievedinline85.

    C.Theresourceconnectionwillnotbeclosedonline88.

    D.Theenclosingmethodwillthrowanexceptiontoitscaller.


    参考答案:C

  • 第5题:

    下列复选框构造方法,错误的是()。

    A.setLayout(newGridLayout(3,1));

    B.add(newCheckbox("one",null,true));

    C.add(newCheckbox("tWO");

    D.add(newCheckbox("one",true);


    正确答案:D

  • 第6题:

    The relative pronoun "which" in the last paragraph (Line 6) refers to (  ).

    A.experts
    B.periods
    C.theories
    D.issues

    答案:D
    解析: