1/12
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
exception
an event that disrupts the normal flow of execution
exception handling
responding to exceptions
try block
surrounds normal code
throw statement
initiate an exception that disrupts normal flow of execution
catch clause
catches exceptions occurring in the immediately preceding try block that match the parameter in the catch clause
throws clause
in the method header after the parameter list and before the method body that indicates an instance of the exception class may be thrown from the method
checked exception
A programmer should be able to anticipate and appropriately handle during execution of a program, such as FileNotFoundException. An exception that the compiler verifies is explicitly caught within or thrown from a method.
unchecked exception
An exception indicating a logic or hardware/configuration error that the compiler does not require to be handled during execution.
finally block
associated with a try block, is always executed, even if there is a thrown exception or a return from a method. Typically contains code to release resources that were allocated within the try block, regardless of whether an exception occurred.
Throwable class
Instances of this class and all descendants can be thrown and handled.
Error class
Instances of this class and all descendants that are thrown are likely hardware or configuration issues that the program itself cannot handle. [unchecked]
RuntimeException class
Instances of this class and all descendants that are thrown are likely logic errors (bug) and should be fixed by the programmer. Includes NullPointerException, IndexOutOfBoundsException, ArithmeticException [unchecked]
Exception class
Instances of this class and descendants other than from the RuntimeException class are all checked exceptions.