{
int x = 12;
/* only x available */
int q = 96;
/* both x & q available */
}
/* q "out of scope" */
在Java里不能写这样的代码。
int x = 96; /* illegal */