I just noticed recently, while coding, that surrounding code with braces without any condition (or anything else) lets the code running correctly. For example, the following snippet:
public static void main(String[] args) {
{
System.out.println("Hello world !");
{
System.out.println("Hello subworld !");
{
System.out.println("Hello sub-subworld !");
}
}
}
}
Gives the following output:
Hello world !
Hello subworld !
Hello sub-subworld !
I would like to know: are there any consequences, deeper into execution, of this kind of practice ? And, is it used in any case and proven to be useful ?