1. Java Concept Matching.
- throwing an exception
- when an exceptional condition is detected an
Exception
object is created andthrow
statement is used to pass theException
to a catch block or up the call stack - catching an exception
- handling an exception that has been thrown to a try block
- try block
- a set of statements that includes at least one statement that can throw an exception
- catch block
- a set of statements meant to catch the exception(s) specified in the catch header that are called immediately following the statement that threw an exception in the try block
- finally block
- a set of statements that are executed after the try block or after the catch block if an exception is thrown
- dynamic scope
- the scope that changes at runtime. In java this happens using try/catch blocks with exception handling.
static scope
- the scope defined by source code
dialog box
- a window that can only be created from a top-level window.
top-level window
- a window that can be created on its own.
checked exception
- an exception that needs to either be caught in a try/catch block, or be in a method that throws the exception.
- unchecked exception
- an exception that doesn’t need to be caught.
- method stack
- A data structure that holds the current history of method calls.
- method call
- a statement that invokes a particular method.
Match each of the following Exception concepts.