Java   View all facts   Glossary   Help
syntactic unit > scoping unit > block > nested block > finally block
Next nested blockinitialization block    Upnested block    Previous nested blocktry block   

finally block comparison table
Subject have syntax be part of has definition have purpose is a subtopic of is a kind of
nested block  A block that is nested inside another blockto create a new scope and/or to create a compound statementStatements and Expressionsblock
finally block
// a try-catch-finally statement showing the finally block in bold
try{
statements
} catch (exception_type1 identifier1) {
statements
} catch (exception_type2 identifier2) {
statements
...
} finally {
statements
}
try-catch-finally statement to clean up internal state or to release non-object resources, such as open files stored in local variables, whether or not an exception has occurred.Exception Handlingnested block

Next nested blockinitialization block    Upnested block    Previous nested blocktry block