Exception Handling 3552 - Chuck Norris Cipher Encoder (Java)
Exception Handling 3552 - Chuck Norris Cipher Encoder (Java)
6. Conclusion.
The try-catch statement allows us to handle both checked and unchecked exceptions .
The try block wraps the code that may throw an exception while the catch block
handles this exception in case it occurs, also allowing us to get some information
about it. It is possible to use several handlers to provide different scenarios for
different types of exceptions.
Finally, there's an optional finally block that is always executed. Its main
feature is that it executes even if we fail to handle an exception at all.