Chapter 10 Flashcards
In object-oriented programming terminology, an unexpected or error condition is a(n)
Exception
All Java Exceptions are
Throwable
Errors are ______ serious than Exceptions
more
The method that ends the current application and returns control to the operating system is
System.exit()
In object-oriented terminology, you _______ a procedure that might not complete correctly.
Try
A method that detects an error condition or Exception _______ an Exception.
Throws
A try block includes
The keyword try, curly braces, and statements that might cause Exceptions
The segment of code that handles or takes appropriate action following an Exception is a _____ block.
Catch
You ______ within a try block.
Can place any number of statements
If you include three statements in a try block and follow the block with three catch blocks, and the second statement in the try block throws an Exception, then
The first matching catch block executes
When a try block does not generate an Exception and you have included multiple catch blocks,
No catch blocks execute
The catch block that begins catch(Exception e) can catch Exceptions
For both IOExceptions andArithmeticExceptions
The code within a finally block executes
Whether or not the try block identifies any Exceptions
An advantage to using a try… catch block is that exceptional events are
Isolated from regular events
Methods that can throw an Exceptions
Any method