我有一些Java代码以两种方式使用花括号
// Curly braces attached to an 'if' statement:
if(node.getId() != null)
{
node.getId().apply(this);
}
// Curly braces by themselves:
{
List<PExp> copy = new ArrayList<PExp>(node.getArgs());
for(PExp e : copy)
{
e.apply(this);
}
}
outAMethodExp(node);
Run Code Online (Sandbox Code Playgroud)
在第一个if声明之后,那些独立的花括号是什么意思?