Optional lesson — beyond the AP CS A exam. Catching exceptions with try/catch is not on the AP exam (which only declares throws); this is here for a fuller picture of Java.
Several catches and finally
Different problems throw different exception types, and you can write a separate catch for each. A finally block, if present, runs no matter what — whether or not an exception happened — so it is used for cleanup.