Blocks and Block Bodies in Java Programming

Blocks and Block Bodies in Java Programming

Previous Home Next

 

A block is a sequence of statements, local class declarations and local variable declaration statements within braces.

A block is executed by executing each of the local variable declaration statements and other statements in order from first to last (left to right)
After a block is executed all local variables defined inside the block is discarded, go out of scope.
{
...
 // --  a block --- inside block there is block body.
}
 


 

Previous Home Next