P10: In Java, __________ is the keyword that declares a set of statements which will be executed if a matching Java exception occurs in the preceding "try" block.
A: Catch
B: Implements
C: Byte
D: Abstract
A: Catch
B: Implements
C: Byte
D: Abstract
举一反三
- P10: In Java, ______ produces an exception to stop calling stack and redirects program execution to the first catch block. A: Throw B: This C: New D: Implements
- Java中,下面捕获异常的语句不正确的是( )。 A: try{……}finally{……} B: try{……}catch(Exception ex){……} C: try{ try{……}}catch(Exception ex){……} D: try{ try{……} finally{……}}catch(Exception ex){……}
- P10: In Java, ___________ is used to declare a class-like structure. A: New B: Interface C: Catch D: Abstract
- Which of the following statements is true? ( ) A: The catch block contains the code that might throw an exception. B: The try block contains the code that handles the exception if one occurs. C: You can have many catch blocks to handle different types of exceptions. D: When a try block terminates, any variables declared in the try block are preserved.
- Which is the correct statement about the throw statement? A: The throw statement allows the code to explicitly throw an exception. B: throw exception expression; It raises an exception which is an arbitrary value. C: throw; can exist in the catch block, as well as in the try and finally blocks. D: throw; can only be used in catch blocks to ignore the exception currently being handled by the catch block.