Which four types of object can be thrown using the throw statement?()A、 ErrorB、 EventC、 ObjectD、 ExceptionE、 ThrowableF、 Runtime Exception

题目

Which four types of object can be thrown using the throw statement?()

  • A、 Error
  • B、 Event
  • C、 Object
  • D、 Exception
  • E、 Throwable
  • F、 Runtime Exception
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Given:What is the result?()

A.Compilation fails.

B.exception is thrown at runtime.

C.The attribute id in the ItemTest object remains unchanged.

D.The attribute id in the ItemTest object is modified to the new value.

E.A new ItemTest object is created with the preferred value in the id attribute.


参考答案:A

第2题:

Which of the following objects can be directly referenced by a window object? ()

A. Schedule object

B. Program object

C. Job object

D. Resource plan

E. Resource consumer group


参考答案:A, D

第3题:

Whichfourtypesofobjectcanbethrownusingthethrowstatement?()

A.Error

B.Event

C.Object

D.Exception

E.Throwable

F.RuntimeException


参考答案:A, D, E, F

第4题:

Which the statement is true?()

  • A、 The Error class is a Runtime Exception.
  • B、 No exceptions are subclasses of Error.
  • C、 Any statement that may throw an Error must be enclosed in a try block.
  • D、 any statement that may throw an Exception must be enclosed in a try block.
  • E、 Any statement that may throw an Runtime Exception must be enclosed in a try block.

正确答案:B

第5题:

static void test() throws RuntimeException {  try {  System.out.print(”test “);  throw new RuntimeException();  }  catch (Exception ex) { System.out.print(”exception “); }  }  public static void main(String[] args) {  try { test(); }  catch (RuntimeException ex) { System.out.print(”runtime “); }  System.out.print(”end “);  }  What is the result?() 

  • A、 test end
  • B、 Compilation fails.
  • C、 test runtime end
  • D、 test exception end
  • E、 A Throwable is thrown by main at runtime.

正确答案:D

第6题:

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.


参考答案:B

第7题:

Java程序中读入用户输入的一个值,要求创建一个自定义的异常,如果输入值大于10,使用throw语句显式地引发异常,异常输出信息为“something’swrong!”,语句为()。

A.if(I>10)throw Exception(“something’swrong!”);

B.if(I>10)throw Exceptione(“something’swrong!”);

C.if(I>10)thrownew Exception(“something’swrong!”);

D.if(I>10)thrownew Exceptione(“something’swrong!”);


正确答案:C

第8题:

Whichfourcanbethrownusingthethrowstatement?()

A.Error

B.Event

C.Object

D.Throwable

E.Exception

F.RuntimeException


参考答案:A, D, E, F

第9题:

Given a JSP error page, which implicit object refers to the uncaught Throwable that resulted in th epage being invoked?()

  • A、 Error
  • B、 Exception
  • C、 Throwable
  • D、 Request error
  • E、 Request exception

正确答案:B

第10题:

可以使用throw语句抛出的对象包括()。

  • A、Error
  • B、Event
  • C、Exception
  • D、Object
  • E、Throwable
  • F、RuntimeException

正确答案:A,C,E,F

更多相关问题