What is Blocks of Code in Java?

Java allows two or more statements to be grouped into blocks of code, also called code blocks.
This is done by enclosing the statements between opening and closing curly braces. Once a
block of code has been created, it becomes a logical unit that can be used any place that a
single statement can.

if(x < y) { // begin a block
x = y;
y = 0;
}// end of block