Try-Catch Blocks To signal an abnormal occurrence – method can throw an exception – throw occurs inside a try block try block followed by one or more catch blocks Form: try { … statement list … } catch (Exception_Type 1 variable_name 1 ) { … } catch (Exception_type 2 variable_name 2 ) { … } finally { … } Exception thrown hereProgram searches catch blocks looking for type match for exception thrown When match found, that block of statements executed
{}