Exception Flashcards
(18 cards)
An ___________ is an error or unexpected
situation that happens while the program is
running.
exception
___________ refers to techniques
that Java uses to detect, handle, and
respond to errors in a controlled way.
Exception handling
A ________ happens while the
program is running
runtime exception
A ______ is a mistake in the code structure, like missing a semicolon, and is found before the program runs (during
compilation).
syntax error
Both of these classes come from a parent
class called ____________, and like all Java
classes, they also come from the base class
Object.
Throwable
____________
Represents serious system-level problems.
Error Class
___________
Represents less serious, recoverable problems.
Exception Class
A _____ means that the program stops
running suddenly because of an error.
crash
The list of method calls shown in the error
message is called a ___________.
stack trace
What Is a Stack Trace?
It shows the ___________________
that led to the error.
sequence of method calls
A ____________ program:
Keeps running even if something goes wrong.
May reduce performance or features, but it won’t
crash.
fault-tolerant
A_________ program:
Can handle unexpected problems.
Is more reliable under stress or errors.
robust
A____________ can have many statements.
try block
_____________ if the input
is not an integer
InputMismatchException
__________ if you divide by
zero
ArithmeticException
A ____________contains code that will
always run, whether or not an
exception happens.
finally block
_____________ These are expected errors that the programmer
should prepare for.
Checked Exceptions