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
A: Throw
B: This
C: New
D: Implements
举一反三
- 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
- 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.
- 智慧职教: 现有: 1. class Birds { 2. public static void main (String [] args) { 3. try { 4. throw new Exception () ; 5. } catch (Exception e) { 6. try { 7. throw new Exception () ; 8. } catch (Exceptio
- P10: In Java, ___________ is used to declare a class-like structure. A: New B: Interface C: Catch D: Abstract
- 下面语句中不存在语法错误的选项是( )。 A: throw new NullPointerException(); B: throw “Exception”; C: throw new Exception(); D: throw new IOException();