Click the Exhibit button. Given:Which statement is true if a TestException is thrown on line 3 of class B? ()A.Line 33 must be called within a try block.B.The exception thrown by method1 in class A is not required to be caught.C.The method declared on lin

题目
Click the Exhibit button. Given:Which statement is true if a TestException is thrown on line 3 of class B? ()

A.Line 33 must be called within a try block.

B.The exception thrown by method1 in class A is not required to be caught.

C.The method declared on line 31 must be declared to throw a RuntimeException.

D.On line 5 of class A, the call to method2 of class B does not need to be placed in a try/catch block.


相似考题
更多“Click the Exhibit button. Given:Which statement is true if a TestException is thrown on line 3 of class B? () ”相关问题
  • 第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题:

    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

  • 第3题:

    32、加载JDBC驱动是通过调用方法 java.lang.Class.()实现的。写出任意3种Statement接口:()、()、()。


    Class.forName() ;java.lang.Class.forName()

  • 第4题:

    Given:WhichstatementistrueifaResourceExceptionisthrownonline86?()

    A.Line92willnotexecute.

    B.Theconnectionwillnotberetrievedinline85.

    C.Theresourceconnectionwillnotbeclosedonline88.

    D.Theenclosingmethodwillthrowanexceptiontoitscaller.


    参考答案:C

  • 第5题:

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

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

    答案:D
    解析: