Java   View all facts   Glossary   Help
syntactic unit > scoping unit > block > nested block
Next blockbody    Upblock    Previous blockelse block   

nested block comparison table
Subject have syntax be part of have purpose is a subtopic of
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 statementto 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 Handling
initialization block  to be executed before any method for a class or instanceClasses
try block
// a try-catch-finally statement showing the try block in bold
try{
statements
}
catch (exception_type1 identifier1) {
statements
} catch (exception_type2 identifier2) {
statements
...
} finally {
statements
}
try-catch-finally statementto contain statements that might throw an exceptionException Handling

Next blockbody    Upblock    Previous blockelse block