8. The finally Block
If a program’s flow of control enters a try
statement that has a finally block, the finally bloc
k is always executed
If no exception occurs inside the try block, then at the
end of the try block, control skips over any catch claus
es and goes to the finally block
If an exception occurs inside the try block, then any
appropriate catch clauses in the catch clauses section
are executed, followed by execution of the finally bloc
k
10. Throwing Exceptions
You can make your code explicitly raise
an exception by using the throw statement
. The syntax for the throw statement is the
following