Exception Handling

Java Exception Handling - 11 Cards
Click here to toggle all cards
Exception
An interruption in program flow due to an error or exceptional event
Exception Handling
Managing errors and exceptions in Java
NullPointer Exception
Error caused by attempting to operate on a null object
Exception Class
A class in Java that represents errors and exceptional events
printStackTrace()
Displays an error message and its trace in Java
try-catch
Mechanism for handling errors and exceptions during program execution
finally
Code in finally block is almost always executed (use case - clean up resources)
RuntimeException
Type of exception that does not need to be explicitly handled
Custom Exception
A user-defined exception class
IOException
Exception that occurs when dealing with input/output operations
SQLException
Exception that occurs when dealing with database operations