main_block_of_statements catch (exception_type variable block_of_statements catch (exception_type variable block_of_statements finally block_of_statements where there must be at least one catch partbut the finally part is optional each exception_type is the type of some exceptionand each variable is valid java variable name the java run-time environment begins performing try-catch block such as this by executing the block of statementsmain_block_of_statements if this execution generates no exceptionsthen the flow of control continues with the first statement after the last line of the entire try-catch blockunless it includes an optional finally part the finally partif it existsis executed regardless of whether any exceptions are thrown or caught thusin this caseif no exception is thrownexecution progresses through the try-catch blockjumps to the finally partand then continues with the first statement after the last line of the try-catch block ifon the other handthe blockmain_block_of_statementsgenerates an exceptionthen execution in the try-catch block terminates at that point and execution jumps to the catch block whose exception_type most closely matches the exception thrown the variable for this catch statement references the exception object itselfwhich can be used in the block of the matching catch statement once execution of that catch block completescontrol flow is passed to the optional finally blockif it existsor immediately to the first statement after the last line of the entire try-catch block if there is no finally block otherwiseif there is no catch block matching the exception thrownthen control is passed to the optional finally blockif it existsand then the exception is thrown back to the calling method consider the following example code fragmentint index integer max_value/ billion