Java 2 chapter 10 review study
A(n) _________________ is a statement used in testing programs that should be true; if it is not true, an Exception is thrown
assertion
All Java Exceptions are _________________.
Throwables
Which of the following statements is true?
Errors are more serious than Exceptions.
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 all of the following elements except _________________.
the keyword catch
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 and ArithmeticExceptions
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
Which methods can throw an Exception?
any method
When a method throws an Exception and does not catch it, the Exception _________________.
is thrown to the calling method, if there is one
Which of the following is least important to know if you want to be able to use a method to its full potential?
the number of statements within the method
The memory location where the computer stores the list of method locations to which the system must return is known as the _________________.
call stack
You can get a list of the methods through which an Exception has traveled by using the _________________ method.
printStackTrace()
A(n) _________________ is a statement used in testing programs that should be true; if it is not true, an Exception is thrown
assertion