block in Java

A block in Java is a set of code enclosed within curly braces { } within any class, method, or constructor. It begins with an opening brace ( { ) and ends with an closing braces ( } ). Between the opening and closing braces, we can write codes which may be a group of one or more statements.
In Java, every class has a class block that groups the data and methods inside the class. Similarly, every method has a method block that contains a group of statements.
A block can also be placed within another block that is called nested block in java.
There are three types of blocks in Java. They are as follows:
* Local block
* Instance initialization block (Non-static initialization block)
* Static initialization block