6.9 try...catch statement
A try-catch statement should have the following format:
try {
statements;
} catch (ExceptionClass e) {
statements;
}
a try The -catch statement may also be followed by a finally statement, which will be executed regardless of whether the try code block is successfully executed.
try {
statements;
} catch (ExceptionClass e) {
statements;
} finally {
statements;
}